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

Ability to search by option value and label #133

Open
chaitanyavelaga opened this issue Aug 18, 2017 · 6 comments
Open

Ability to search by option value and label #133

chaitanyavelaga opened this issue Aug 18, 2017 · 6 comments
Assignees

Comments

@chaitanyavelaga
Copy link

No description provided.

@crlcu crlcu self-assigned this Aug 21, 2017
@crlcu
Copy link
Owner

crlcu commented Aug 21, 2017

Could you please explain me the reason why you need this functionality?
Basically from the UI you don't know which is the value of an option element, you just see the text / label.
So thinking from a user experience perspective, this might introduce a lot of confusion.

@chaitanyavelaga
Copy link
Author

chaitanyavelaga commented Aug 24, 2017

You are right. Is there a way we can match non utf8 characters with ascii characters while filtering? i.e. If I look Sao Paulo it should also return the values São Paulo.

@crlcu
Copy link
Owner

crlcu commented Aug 25, 2017

I'll try to find an way of doing this.
Any suggestions are welcomed.

@chaitanyavelaga
Copy link
Author

chaitanyavelaga commented Aug 25, 2017 via email

@crlcu
Copy link
Owner

crlcu commented Sep 13, 2017

I would like to have as less dependencies as possible for this plugin, but I'll think of a way to solve the issue you described.

@salixzs
Copy link

salixzs commented Aug 22, 2018

More extensibility would be achieved if I could specify what attribute to search on.
Default: Label

Use case:
I have a list of countries and as data attribute I have their alternate names, like

<option value="FI" data-search="Finland,Suomi">Finland</option>
<option value="GB" data-search="United Kingdom,Great Britain,England,Scottland,Wales">United Kingdom</option>
<option value="NL" data-search="Netherlands,Holland">Netherlands</option>

This way if I could specify data-search as property/attribute to do searching, then it will allow user to type alternate names and still get correct item from list.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants