esbenp / react-native-clean-form

Easy react-native forms using bootstrap-like syntax with redux-form+immutablejs integration. Styled using styled-components
http://esbenp.github.io/2017/01/06/react-native-redux-form-immutable-styled-components/
MIT License
478 stars 76 forks source link

[Improvement] Focus inputs when tapping the label #25

Open markusguenther opened 7 years ago

markusguenther commented 7 years ago

At the moment it can be annoying to get the input to be focused.

So it would be nice if you can tab the label or form group and then automatically focus the input.

jonstuebe commented 7 years ago

I could be wrong, but don't you just need to do the following in createInputCreator.js?

Before:

<Label>{ label }</Label>
{ renderComponent(props) }

After:

<Label>{ label }
  { renderComponent(props) }
</Label>