You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: packages/components/src/number-control/README.md
+14Lines changed: 14 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -97,6 +97,20 @@ The minimum `value` allowed.
97
97
- Required: No
98
98
- Default: `-Infinity`
99
99
100
+
### onChange
101
+
102
+
Callback fired whenever the value of the input changes.
103
+
104
+
The callback receives two arguments:
105
+
106
+
1.`newValue`: the new value of the input
107
+
2.`extra`: an object containing, under the `event` key, the original browser event.
108
+
109
+
Note that the value received as the first argument of the callback is _not_ guaranteed to be a valid value (e.g. it could be outside of the range defined by the [`min`, `max`] props). In order to check the value's validity, check the `event.target.validity.valid` property from the callback's second argument.
110
+
111
+
- Type: `(newValue, extra) => void`
112
+
- Required: No
113
+
100
114
### required
101
115
102
116
If `true` enforces a valid number within the control's min/max range. If `false` allows an empty string as a valid value.
0 commit comments