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

Remove the array.push(null) when populating the search array #78

Closed mysuperstar closed 2 years ago

mysuperstar commented 2 years ago

Hello, My SelectDropdown contains 150 elements and when i'm searching for the last elements, they doesnt show in the results array. After removing the array.push(null) in the results array, I can see them. I dont know what could be the consequences of this removal, I'm looking for your analyse. Thank you

AdelRedaa97 commented 2 years ago

The idea is that I don't want to lose its original index because I use it to check whether the flatlist item is the selected item or not, so I push null instead and Render empty tags <></> inside the flatlist when the value of the item is null