Open dj-ds opened 2 years ago
add
I had the same error and realized that when you enter a search text it shows the results. So the problem is the filter function, is not working with empty text, for now I modified the file: react-native-picker-modal-view/dist/Helpers/index.js so the filter considers the empty text. It looks like this (first part of the return line):
export const getFilteredData = (items, autoSort, searchText) => {
if (autoSort) {
items.sort((a, b) => trCompare(a.Name, b.Name));
}
return items.filter((l) => {
return !searchText || l.Name.toLowerCase().indexOf(searchText.toLocaleLowerCase()) > -1
});
};
I can't see anything on the picker even after passing the data. This is happening first time I've never seen such issue before.
OS: macOS Monterey Platform: Android React Native version: 0.66.4 react-native-picker-modal-view: "^1.3.2"