react-native-select-dropdown icon indicating copy to clipboard operation
react-native-select-dropdown copied to clipboard

Search can't find data when the list of data is too long.

Open rahmanda-wa opened this issue 3 years ago • 6 comments

And it behave differently across different android device, on some device it able to find the data, but on other device the search only work for a certain length of data list. For instance if i have a list of 150 customer, the search can only find the first 100 customer in the list. Thank you in advance for the help, sorry for my bad english.

rahmanda-wa avatar Jul 05 '22 06:07 rahmanda-wa

I think it's the same issue here https://github.com/AdelRedaa97/react-native-select-dropdown/issues/69

AdelRedaa97 avatar Jul 06 '22 22:07 AdelRedaa97

it can show all the data in the dropdown with no problem, it just wouldn't show the search result if the data list is too long

rahmanda-wa avatar Jul 07 '22 07:07 rahmanda-wa

I think I have the same problem, I have a long list of Az. If you look up the value directly from a word at the end of the list, no filtering result is generated.

I also think it could be something related to the size of the list.

@rahmanda-wa Did you manage to reverse this behavior?

kkkasio avatar Jul 25 '22 19:07 kkkasio

not really, i'm just stuck with it for now

rahmanda-wa avatar Jul 26 '22 02:07 rahmanda-wa

Hi, i am facing now the same behaviour: i have a long list of data and the search function doesn't find last elements of the list.

How can i resolve it?

sbozzella avatar Sep 08 '22 14:09 sbozzella

@kkkasio @sbozzella @AdelRedaa97 @rahmanda-wa i solve this issue by removing a code from react-native-select-dropdown/src/helpers/deepSearchInArr.js at. line number 34 i remove else part here i attach a screen shot of it Screenshot 2022-09-09 at 6 04 00 PM

nikhil3010 avatar Sep 09 '22 12:09 nikhil3010

onScrollEndReached prop is added for pagination in v3.0.0 and also onChangeSearchInputText to make your custom search function outside the component

AdelRedaa97 avatar Oct 21 '22 15:10 AdelRedaa97

@AdelRedaa97 this doesn't fix the issue out of the box, I'm on 3.0.0 and search on my app's dropdowns is still broken where the list of data is too long (breaks where I have over 150 items for example)

I modified the file as @nikhil3010 said and that fixed it

fede4954 avatar Oct 26 '22 09:10 fede4954