components/bits/NumberInput#
NumberInput()#
Parameters#
| Parameter | Type |
|---|---|
props |
NumberInputProps |
Returns#
Element
NumberInputProps#
Properties#
allowEmpty?#
disabled?#
error?#
fullWidth?#
helperText?#
inputProps?#
InputProps?#
integer?#
label?#
max?#
min?#
onChange#
Parameters#
| Parameter | Type |
|---|---|
value |
number | null |
Returns#
void
outOfRange?#
What to do with a value outside [min, max] on commit.
'reject' (the default) keeps the typed text, shows the range in an
error helper and does NOT call onChange — the parent keeps its last
valid value and the user can see exactly what was wrong.
'clamp' is the old behaviour: silently rewrite the field to the nearest
bound. It destroyed the entered value with nothing on screen to say so,
which on a device settings form means a typo becomes a plausible-looking
wrong number. Kept as an opt-in for the few callers whose bounds are
cosmetic rather than meaningful.