AdelRedaa97 / react-native-select-dropdown

react-native-select-dropdown is a highly customized dropdown | select | picker | menu for react native that works for andriod and iOS platforms.
MIT License
320 stars 137 forks source link

You have a large list that is slow to update #69

Closed Latgals closed 1 year ago

Latgals commented 2 years ago

Good afternoon, colleagues.

I want to use a react-native-select-dropdown with a large list (about 2000 items). But Already got a warning: VirtualizedList: You have a large list that is slow to update - make sure your renderItem function renders components that follow React performance best practices like PureComponent, shouldComponentUpdate, etc.

I tried to replace the FlatList with a VirtualizedList in the SelectedDropdown.js file, but nothing happened.

How to replace FlatList with VirtualizedList and will it help? Or is it better to look for another component for large list?

AdelRedaa97 commented 1 year ago

onScrollEndReached prop is added for pagination in v3.0.0 and also onChangeSearchInputText to make your custom search function outside the component