`FlatList` with a `CellRendererComponent` implementation does not show all items on Android

320 views Asked by At

We have a component for a sortable list that uses FlatList with a CellRendererComponent:

<FlatList
  ...
  data={data}
  CellRendererComponent={SortableListItem}
/>

We have a usage where on some Android devices, at least part of the time only the start of the list is shown, and the end is cut.

1

There are 1 answers

0
MikeL On

This appears to be a bug with FlatList (it reproduced with a simpler example), a workaround for short lists it to add:

initialNumToRender={data.length}