You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've discovered an issue where lots of items are incorrectly being filtered out of the list to select from, even though the search input is empty. This is happening on an Android emulator on Windows, with RN 0.66.3 and using Hermes.
The filter function calls searchText.toLocaleLowerCase() as part of the process to filter out any items which don't match the search text. I tried to console.log the result of the .toLocaleLowerCase() call but it was returning the following error: "string length exceeds limit".
That was very confusing given that searchText was an empty string.
I eventually tracked the source of the issue down to an obscure Hermes bug where an empty string being passed to .toLocaleLowerCase() was not in fact returning an empty string but was instead "reading garbage UTF-16 codepoints
off the stack": facebook/hermes@54c8788
I'm just adding this here in case anyone else comes across the same thing and wonders why the full list is not being rendered.
The text was updated successfully, but these errors were encountered:
I've discovered an issue where lots of items are incorrectly being filtered out of the list to select from, even though the search input is empty. This is happening on an Android emulator on Windows, with RN 0.66.3 and using Hermes.
I tracked it down to the filter call in the
Helpers/index.ts
file (https://github.com/pankod/react-native-picker-modal-view/blob/master/src/Helpers/index.ts#L50).The filter function calls
searchText.toLocaleLowerCase()
as part of the process to filter out any items which don't match the search text. I tried to console.log the result of the.toLocaleLowerCase()
call but it was returning the following error: "string length exceeds limit".That was very confusing given that
searchText
was an empty string.I eventually tracked the source of the issue down to an obscure Hermes bug where an empty string being passed to
.toLocaleLowerCase()
was not in fact returning an empty string but was instead "reading garbage UTF-16 codepointsoff the stack": facebook/hermes@54c8788
I'm just adding this here in case anyone else comes across the same thing and wonders why the full list is not being rendered.
The text was updated successfully, but these errors were encountered: