React-native-keyboard-aware-scroll-view: Avoid hiding keyboard when Picker is tapped in tcomb forms

Created on 15 Mar 2018  路  6Comments  路  Source: APSL/react-native-keyboard-aware-scroll-view

Is there a way to avoid keyboard for dismissing when user taps a picker in tcomb forms? This creates unexpected behaviour.

See gif for example:
giphy

Also note that when tapping the picker value and tap to a TextInput field then it won't listen to extraScrollHeight={50} extraHeight={10} values.

React Native question

Most helpful comment

@ltankey this is an upstream issue because this library does not handle the appear/dismiss of the keyboard, just resizes the inner views. react-native-keyboard-aware-scroll-view is a wrapper on top of ScrollView, so please check all the ScrollView props in order to achieve the desired result.

If you want to keep the keyboard always open, please consider using keyboardShouldPersistTaps='always' or keyboardShouldPersistTaps='handled'.

All 6 comments

Could be achieved by setting this prop http://facebook.github.io/react-native/docs/scrollview.html#keyboardshouldpersisttaps

Ping me if not working 馃槈

This isn't working - also using tcomb forms, and have a datepicker (as well as a custom picker for other choice lists).

Setting keyboardShouldPersistTaps to never doesn't achieve this. If a user moves between TextInputs, the keyboard remains open (on iOS, not Android). Should it, with this setting? It doesn't seem like it should. They then go into a custom modal selector (react-native-modal-selector) and when they select something, the keyboard reopens.

Do you want a new ticket?

@ltankey this is an upstream issue because this library does not handle the appear/dismiss of the keyboard, just resizes the inner views. react-native-keyboard-aware-scroll-view is a wrapper on top of ScrollView, so please check all the ScrollView props in order to achieve the desired result.

If you want to keep the keyboard always open, please consider using keyboardShouldPersistTaps='always' or keyboardShouldPersistTaps='handled'.

The issue here is it not dismissing, but I couldn't tell whether it was with this library or upstream. Happy to raise with them, thanks!

Check this out: https://github.com/APSL/react-native-keyboard-aware-scroll-view/blob/master/lib/KeyboardAwareHOC.js#L405

This is what this library does, nothing more than adjusting inner views and passing all the rest of the props into the container ScrollView.

Please ping me if you can't properly resolve the issue in the RN repo and we'll try to come up with a solution.

@alvaromb Thank for awesome prop keyboardShouldPersistTaps. but can we set to specific field? because all of children in scrollview will not dismiss when tap.

Was this page helpful?
0 / 5 - 0 ratings