NumericEdit component

Use <NumericEdit> to have a field for any kind if numeric values. All basic types are supported, including nullable types (int, long, float, double, decimal, etc.).



<NumericEdit Value="123" />


Generic type

Since NumericEdit is a generic component you will have to specify the exact data type for the value. Most of the time it will be recognized automatically when you set the Value attribute, but if not you will just use the TValue attribute and define the type manually eg.
<NumericEdit TValue="decimal?" />


NumericEdit is just a specialized version of TextEdit component so all of the rules and styles are still working all the same. See TextEdit to find the list of supported attributes.

Name Description Type Default
TValue Generic type parameter used for the value attribute. generic
Value Gets or sets the value inside the input field. TValue default
ValueChanged Occurs after the value has changed. EventCallback<TValue>
Step Specifies the interval between valid values. decimal? null
Decimals Maximum number of decimal places after the decimal separator. int 2
DecimalsSeparator String to use as the decimal separator in numeric values. string "."
Culture Helps define the language of an element. string null
Min The minimum value to accept for this input. TValue default
Max The maximum value to accept for this input. TValue default
Autofocus Set’s the focus to the component after the rendering is done. bool false
ShowStepButtons If true, step buttons will be visible. bool? true
EnableStep If true, enables change of numeric value by pressing on step buttons or by keyboard up/down keys. bool? true
SelectAllOnFocus If true, selects all the text entered in the input field once it receives the focus. bool false