Adds a restoreOnFocus prop that is true by default (for backwards compatibility).
You can set it to false to have the numeric input select all the text when the input is focused. As far as I can tell, this does not break the usual selection restoration behavior which is required for the input to behave correctly.
This option is useful in cases where you have several numeric inputs in a UI and you want users to be able to tab between them and edit numbers quickly without having to readjust their selection after focusing an input. This is also the normal behavior of the native numeric input in Chrome and Firefox.
Adds a
restoreOnFocus
prop that istrue
by default (for backwards compatibility).You can set it to
false
to have the numeric input select all the text when the input is focused. As far as I can tell, this does not break the usual selection restoration behavior which is required for the input to behave correctly.This option is useful in cases where you have several numeric inputs in a UI and you want users to be able to tab between them and edit numbers quickly without having to readjust their selection after focusing an input. This is also the normal behavior of the native numeric input in Chrome and Firefox.