ptomasroos / react-native-tab-navigator

A tab bar that switches between scenes, written in JS for cross-platform support
MIT License
2.4k stars 415 forks source link

TextInput lose focus. #58

Closed amibition521 closed 7 years ago

amibition521 commented 8 years ago

One page has a TextInput component.I want to let it loses focus, at the time of page switching, have what way?

ide commented 8 years ago

We don't have an automatic solution for this. When the user taps a tab and we call the onPress function, that's when you have to blur the current TextInput manually.

ptomasroos commented 7 years ago

In onPress

  const field = TextInput.State.currentlyFocusedField();
  TextInput.State.blurTextInput(field);