fateh999 / react-native-paper-dropdown

Dropdown using react native paper TextInput and Menu
121 stars 72 forks source link

[fixes slow render] Use FlatList for optimal performance #99

Open mxmkhv opened 11 months ago

mxmkhv commented 11 months ago

Solves this issue: https://github.com/fateh999/react-native-paper-dropdown/issues/48

Ran on ios and android with list of 250 countries and runs noticeably faster.

Learn more about optimisation here: https://www.callstack.com/campaigns/download-the-ultimate-guide-to-react-native-optimization

RiedelNicolas commented 11 months ago

Hey @mxmkhv excelente solution! I found a minor issue, the useCallBack renderItem is missing the value dependency. This makes than when the selected value changes, the style does not change on the list. (it needs to re-render)