iRoachie / react-native-material-tabs

Material Design implementation of Tabs
MIT License
121 stars 56 forks source link

Input field interactions #39

Closed jling90 closed 5 years ago

jling90 commented 6 years ago

Preamble

If there's a nicer solution I'm open to suggestions! This change will make MaterialTabs friendlier to use on pages with input fields.

Explanation

While an input field has focus, MaterialTabs is not immediately responsive to taps. This is an interaction between the keyboard and ScrollView. At the moment MaterialTabs needs to be tapped twice in order to trigger its press event while an input field is focussed.

This PR allows keyboardShouldPersistTaps to be passed as a prop to the MaterialTabs ScrollView. In the following usage example, MaterialTabs will immediately receive a tap while an input field has focus.

<MaterialTabs keyboardShouldPersistTaps="always" />
iRoachie commented 5 years ago

Thanks again!

iRoachie commented 5 years ago

Released in v3.7.0 💯