react-native-numeric-input
react-native-numeric-input copied to clipboard
[Feature request] - Use validateOnBlur to stop auto focusing the component when the value is wrong
Is your feature request related to a problem? Please describe. I added a validation for the numeric field so I don't like to be auto focus when the value is wrong or empty.
Describe the solution you'd like
I wish validateOnBlur
would give us the option to not being auto focus when the input is wrong.
<NumericInput
ref={ref}
validateOnBlur={false}
...
/>
Describe alternatives you've considered
If that is not the purpose of validateOnBlur
then we could introduce a new property for that (e.g. stopAutoFocus: boolean
).
Additional context This is the current behaviour that I noticed:
I'm automatically focused into the numeric field when the input is wrong. I wish I could stop that. I assume that's just a conditional that we can add here. Let me know if this feature would make sense.