Press on textinput hides modal react-native-modal

Viewed 418

I am rendering Flatlist which render list of items each item have button and modal inside it when the button pressed the modal shall open, each modal have some text inputs inside it so the hierarchy is as the following :

Screen

-FlatList

--Item

---Button

---Modal

----TextInput

When I open press on the first item's button the modal opens and everything works great, but when I scroll down in the Flatlist and press on the last item and open the modal open then I try to write on the modal's textinput the modal disappears.

I am sure that the modal exists but I cannot see it, Any help?

GIF explaining what I mean

1 Answers

I suffered from the same issue and after digging into this subject, I do not think there is any other way than taking the modal out of FlatList. Seems that there is a bug in Android with a modal with textinput inside a FlatList, which caused when the keyboard expands. When modal is outside of the FlatList, works like a charm.

Related