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
314 stars 134 forks source link

Issue searching large datasets and the fix #148

Closed JonasIbsen closed 4 months ago

JonasIbsen commented 1 year ago

Thx for great feature :)

When searching large dataset it does not show all results unless i uncomment this line in node_modules\react-native-select-dropdown\src\helpers\deepSearchInArr.js

export const deepSearchInArr = (query, arr) => { let array = []; for (let i = 0; i <= arr.length - 1; i++) { if (contains(arr[i], query)) { array.push(arr[i]); } else { //array.push(null); <----------------------------------- } if (i == arr.length - 1) { return array; } } };

Hope you can make this default as there is no need to push null?

jwilson573 commented 11 months ago

I just had a similar issue and can confirm this change does indeed allow for partial search of large data sets.

AdelRedaa97 commented 11 months ago

Can you try the last version (v3.4.0) and tell me if this issue still exists?

pgmatheus commented 11 months ago

I tested with this new version and it's now working with large datasets.

CesarCanoff commented 9 months ago

Thanks very much bro! @JonasIbsen