Textarea and TextInput with isFocus
Is your feature request related to a problem? Please describe.
It is very useful if we could define the user focus to TextInput and Textarea.
Describe the solution you'd like Adding an extra props to the component interface:
isFocus?: boolean;
And then make it active when loaded:
useEffect(() => {
if (isFocused) {
input.current.focus();
}
}, []);
Describe alternatives you've considered n/a
Additional context
Maybe it is necessary to validate the need to implement this to other components inside the FormControls.
I think a valid solution would be to make it so you can pass refs to all of the form controls. That should be available at the very least since I know a lot of people are using controlled inputs in React still.
Someone made a PR recently that showed how to do that. So it should be very easy to make that change for all the form controls. Thoughts?