We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hi! 👋
Firstly, thanks for your work on this project! 🙂
The search was not working properly, it was giving error when search special characters, so I fixed it and here's the solution
Here is the diff that solved my problem:
diff --git a/node_modules/react-native-input-select/src/index.tsx b/node_modules/react-native-input-select/src/index.tsx index 615ab0f..bfe882c 100644 --- a/node_modules/react-native-input-select/src/index.tsx +++ b/node_modules/react-native-input-select/src/index.tsx @@ -225,10 +225,13 @@ export const DropdownSelect: React.FC<DropdownProps> = ({ /*=========================================== * Search *==========================================*/ + const escapeRegExp = (text: string) => { + return text.replace(/[.*+?^${}()|[\]\\]/g, '\\$&'); + }; const onSearch = (value: string) => { setSearchValue(value); - let searchText = value.toString().toLocaleLowerCase().trim(); + let searchText = escapeRegExp(value).toLocaleLowerCase().trim(); const regexFilter = new RegExp(searchText, 'i');
This issue body was partially generated by patch-package.
The text was updated successfully, but these errors were encountered:
@DarkcoderSe Thank you for reporting this issue!
Sorry, something went wrong.
hope it will be merged soon!
Yes! Thanks again. The fix has been released.
Successfully merging a pull request may close this issue.
Hi! 👋
Firstly, thanks for your work on this project! 🙂
The search was not working properly, it was giving error when search special characters, so I fixed it and here's the solution
Here is the diff that solved my problem:
This issue body was partially generated by patch-package.
The text was updated successfully, but these errors were encountered: