AdelRedaa97/react-native-select-dropdown

Issue searching large datasets and the fix

Closed this issue · 4 comments

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?

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

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

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

Thanks very much bro! @JonasIbsen