Skip to content

Searching #64

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

Open
irfanrosly opened this issue Jun 1, 2017 · 8 comments
Open

Searching #64

irfanrosly opened this issue Jun 1, 2017 · 8 comments

Comments

@irfanrosly
Copy link

How would if search is implemented? For example, user can type in the "Please select.." and it can filter the option. It would be nice for an option with a long list.

@sohobloo
Copy link
Owner

sohobloo commented Jun 2, 2017

Good idea. I'll think about it.

@dmr07
Copy link

dmr07 commented Jun 25, 2017

I agree. I'm trying to implement search with this module and there are a few things that make it difficult. For example, I call modal_dropdown.show() after every debounced key event, and I when I do the modal seems to steals focus the input area, causing the keyboard to close. The result is user not being able to type more than one key at a time.

Setting keyboardShouldPersistTaps to true does not seem to help in this case.

@bradmatt275
Copy link

I'm quite new to React so this is far from perfect, but i was able to get it working with this code.

CustomPicker.txt

screenshot01
screenshot02

@sohobloo
Copy link
Owner

@bradmatt275
We have to design searching function from both flexibility and friendly interactivity.
For flexibility, I think we can provide both a default searching function like your code and a custom interface for array options that we can not handle or some custom searching requirement.
For UI, I haven't found a nice way so for but yours give me inspiration.

Thanks.

@naomipol
Copy link

@dmr07 I'm also facing the same issue where keyboard dismissed when calling the show() method.
Have you reached any solution yet?
Thanks in advanced.

@cheesest3ak
Copy link

@naomipol have you found a solution for this?

@naomipol
Copy link

@cheesest3ak Iv'e ended up using a different library for this use case: https://github.com/l-urence/react-native-autocomplete-input

@MosesGit
Copy link

MosesGit commented Feb 7, 2018

I got something working based on @bradmatt275's great example. I filter the options data set myself based on the search.

Would it be possible to lock the first row, like have it sticky at the top? Currently if you scroll the first row out of view, the user will no longer be able to search.

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

7 participants