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
**value** |`number` or `string` | `""` which converts to 0
64
64
**min** |`number` | `Number.MIN_SAFE_INTEGER`
@@ -78,6 +78,14 @@ Any other option is passed directly the input created by the component. Just
78
78
don't forget to camelCase the attributes. For example `readonly` must be `readOnly`.
79
79
See examples/index.html for examples.
80
80
81
+
## Event Callbacks
82
+
You can pass callback props like `onClick`, `onMouseOver` etc. and they will be
83
+
attached to the input element and React will call them with `null` scope and the corresponding event. However, there are few special cases to be aware of:
84
+
85
+
*`onChange` - Called with `valueAsNumber` and `valueAsString`. The `valueAsNumber` represents the internal numeric value while `valueAsString` is the same as the input value and might be completely different from the numeric one if custom formatting is used.
86
+
*`onInvalid` - Will be called with `errorMessage`, `valueAsNumber` and `valueAsString`.
87
+
*`onValid` - There is no corresponding event in browsers. It will be called when the component transitions from invalid to valid state with the same arguments as onChange: `valueAsNumber` and `valueAsString`.
88
+
81
89
## Styling
82
90
The component uses inline styles which you can customize. The `style` prop is not added
83
91
directly to the component but instead it is a container for styles which you can overwrite.
0 commit comments