Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature request] - Use validateOnBlur to stop auto focusing the component when the value is wrong #89

Open
CristhianMotoche opened this issue Dec 29, 2022 · 0 comments

Comments

@CristhianMotoche
Copy link

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:

Untitled 14

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant