jwohlfert23 / react-native-tag-input

A simple React Native component that creates an input for tags, emails, etc.
MIT License
231 stars 104 forks source link

make textinput ref accessible #56

Closed dswbx closed 6 years ago

dswbx commented 6 years ago

Added a new prop to make TextInput's ref accessible. Example usage:

<TagInput
    {/*...*/}
    inputRef={(r) => this._inputRef = r}
/>

The reason for it is e.g. when using Keyboard aware ScrollView mechanisms and need to keep track of TextInput's focus state.

dswbx commented 6 years ago

sry, just noticed that you can already access it by <TagInput ref="tagInput" /> and this.refs.tagInput.tagInput.