Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Search Input not searching #120

Open
chazzini opened this issue Jun 9, 2024 · 1 comment
Open

Search Input not searching #120

chazzini opened this issue Jun 9, 2024 · 1 comment

Comments

@chazzini
Copy link

chazzini commented Jun 9, 2024

After or before selecting my options, I input "hearts" as a search term in my working multipleselectlist, I don't get any errors but the search is not working

@chazzini
Copy link
Author

chazzini commented Jun 9, 2024

from code in MultipleSelectComponent
onChangeText={(val) => {
let result = data.filter((item: L1Keys) => {
val.toLowerCase();
let row = item.value.toLowerCase()
return row.search(val.toLowerCase()) > -1;
});
setFilteredData(result)
}}

Should be if(row.search(val.toLowerCase()) > -1) return item; not return row.search(val.toLowerCase()) > -1;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant