-
Notifications
You must be signed in to change notification settings - Fork 299
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Keyboard automatically closes when a textinput is focused inside the modal #58
Comments
@jeremybarbet It would be great if you could help me, Thanks |
Hi! Have you been able to figure it out? It's a known issue but I don't have time to work on it unfortunately. |
Yes, to prevent this issue you need to render the list header using good ol' if-else logic 🤣 |
Definitely not ideal. I'll do my best to work on this when I have downtime! |
Have you tried |
It's because the ListHeaderComponent from the FlatList is being re-render each time you change the state. I'm not sure to see a quick solution to fix in this context of usage. Even though if you have the possibility to use I'm closing this issue |
This fixed it for me: callstack/react-native-paper#736 (comment) I needed to change the header prop from a function to an element. |
Is this solved in a proper way? |
If you use FlatList for rendering view without inputting data, you need to set removeClippedSubviews={true} or use the default option for optimizing rendering view. For your case (render with input) you should set removeClippedSubviews={false} to prevent the keyboard hide/show.
|
Thanks for the good explanation. It worked for me also. |
it worked for me |
its working |
Issue:
Keyboard automatically closes after typing a single character on iOS (haven't tested android) when a text input inside the modal is focused
Modal:
ListHeader component:
EXPO SNACK: https://snack.expo.io/HkZULlxSB
The text was updated successfully, but these errors were encountered: