PedroBern / react-native-collapsible-tab-view

A cross-platform Collapsible Tab View component for React Native
MIT License
869 stars 171 forks source link

How to make the keyboard persist taps within a tab of tab.container #271

Open sayran123 opened 2 years ago

sayran123 commented 2 years ago

Hi so I currently have a chat feature nested within the Tab of the Tabs.Container and when i click anywhere within the tab view it dismisses the keyboard automatically. I would like for the the ability for the keyboard to persist taps yet I cannot find the location to use the prop keyboardShouldPersistTaps.

I know that this prop is used for Flatlist and Scrollview which i dont believe that the container is, so I was wondering what causes the behavior of the click dismissing the keyboard and if you have any workarounds.

Also i would like to note that I have tried taking the chat feature outside the tabs container and the keyboard does persist taps.

Here is how i call it:

<Tabs.Container 
            ref={tabContainerRef}
            ...props
 >
     <Tabs.Tab name="Chat">
         <View {...styling} >
              <SpaceChat 
                  spaceId={props.route.params.spaceId}
                  navigation={props.navigation}
              />
        </View>
     </Tabs.Tab> 
</Tabs.Container>

Thanks for any help