kor TürkçeGitHub

NumberField

Edits a number using the active UI5 number format.

kor/ui/NumberFieldSource

When to use

  • Collect quantities with a unit, a step size or an allowed range.

Examples

Count items

Loading the example

<k:NumberField label="Quantity" value="2" min="0" change=".onChange"/>

Set the parcel weight

Loading the example

<k:NumberField label="Parcel weight" value="2.5" unit="kg" min="0" max="25"
step="0.5" decimals="1" help="Maximum 25 kg per parcel." change=".onWeight"/>

API

Properties

NameTypeDefaultDescription
valuefloat0Numeric value
labelstringField label
unitstringDisplayed unit
decimalsint0Number of decimal places
stepfloat1Step size
minfloat-1e15Minimum value
maxfloat1e15Maximum value
helpstringSupporting text
errorstringValidation message
enabledbooleantrueWhether the field can be used

Events

NameTypeDescription
changevalue: floatThe value changed

Related

TextFieldForm