Friday, 5 November 2021

FlatList exceeds its container with its content: How to make FlatList with fixed height

I have a <FlatList />. Within this <FlatList /> I have another <FlatList />. The nested <FlatList /> gives me some odd behaviour. It exceeds the margins of its container. As you can see, the Flags are going over the yellow box, which represent the bounds of the <FlatList />.

Here is a Snack https://snack.expo.dev/@stophfacee/nested-flatlist which reproduces the problem.

Please note: The animation (when touching the hotpink rectangle) does not work properly. I am not sure why. However, I still inluded it because I am not sure if that might be the problem.



from FlatList exceeds its container with its content: How to make FlatList with fixed height

No comments:

Post a Comment