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

Can't see anything on the picker #96

Open
dj-ds opened this issue Feb 2, 2022 · 2 comments
Open

Can't see anything on the picker #96

dj-ds opened this issue Feb 2, 2022 · 2 comments

Comments

@dj-ds
Copy link

dj-ds commented Feb 2, 2022

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.

Screenshot 2022-02-02 at 10 59 06 AM

OS: macOS Monterey
Platform: Android
React Native version: 0.66.4
react-native-picker-modal-view: "^1.3.2"

@atul407
Copy link

atul407 commented Aug 23, 2022

add #000000 in android->app->src->main->res->values->styles.xml under style name AppTheme

@mballinas
Copy link

mballinas commented Oct 31, 2022

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
    });
};

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

3 participants