Numeric Input
Basic usage
Used for entering numeric data, it can be configured by setting theOptparameter:
<ONumericInput @bind-Value="model.NumericFloat"
Opt="@(new() { Decimals = 2, Min = 20, Max = 150, FormatFunc = formatCurrency })" />
...
private string formatCurrency(double? val)
{
if (val is null) return string.Empty;
return val.Value.ToString("N2") + " $";
}
NumericInputOpt
Numeric input options model| AfterChangeFunc | Function to execute after value has changed |
| ClearBtn | Clear button |
| CssClass | Main container css class |
| Decimals | Number of decimals |
| Disabled | Is editor disabled |
| FormatFunc | Display value format function, will receive the value as parameter and returns the display value as string |
| Max | Maximum value |
| Min | Minimum value |
| Placeholder | Input placeholder |
| ShowSpinners | Show input spin up/down buttons |
| Step | Increase/decrease button step |
Comments