4

I have several inputs fields that are presented one after the other using flatlist and smartView that represents each input, with the structure being like this:

 <View> <Dialog> <View > <KeyboardAvoidingView> <FlatList renderItem={({ item }) => ( <SmartView //structure of view per input <SafeAreaView> <View> <InputItem/> <TouchableNativeFeedback/> //button that must be clicked </View> </SafeAreaView> /> )}> </KeyboardAvoidingView> </View> </Dialog> </View > 

The class <InputItem/> contains the <TextInput> in question and the <TouchableNativeFeedback/> is on the same level as the <InputItem/>

I just need for the button to register a click WHEN KEYBOARD is showing, as this app is running on iPad and keyboard do not come in they way of anything. Many thanks

2 Answers 2

6

Fixed issue by adding keyboardShouldPersistTaps={"always"} to component <Dialog>.

Sign up to request clarification or add additional context in comments.

1 Comment

Guys just add: keyboardShouldPersistTaps={"always"} In your flatlist, virtualized list or recycler list view
1

Add this prop to your FlatList so that touches will get detected even though the keyboard is opened: keyboardShouldPersistTaps="handled" or keyboardShouldPersistTaps="always"

2 Comments

unfortunately, I have already tried this approach but nothing seemed to change. the keyboard is still being dismissed and button is not being clicked. This is why I attached the structure of the views, maybe I am missing something.
Guys just add: keyboardShouldPersistTaps={"always"} In your flatlist, virtualized list or recycler list view

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.