hoaphantn7604 / react-native-element-dropdown

A react-native dropdown component easy to customize for both iOS and Android.
MIT License
861 stars 154 forks source link

Adding Option To Allow Pushing Selected Items To The Top of Items #241

Open SamJbori opened 6 months ago

SamJbori commented 6 months ago

While using the component with large list (5000+), it felt much easier if I can see the selected items first, epically if I am using
visibleSelectedItem={false}, so I added an optional selectedToTop Boolean property that will trigger this behavior.

simply it will filter the data twice and using the checkSelected() method

Media_240103_133343

I tested the speed and it's just fine

I hope you like it and approve, I've started programming few months ago and this is my first contribution, I hope it's of some value.