-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Search by text and value #800
Comments
I would really love this functionality as well! I've got customer names in my select list with customer numbers as the option value. It would be very helpful to be able to search for a customer by either name or number! |
I do share your view. I have select with price like this
|
Also useful for states, like: <option value="NY">New York</option> |
+1 having this as an option would be great. |
+1 for add this feature |
I'm finding myself in increasing situations where this would be extremely beneficial, especially if expanded even more. For instance, with the customer dropdown list, if we could search text, value, AND data attributes... it would be awesome. <select id="customer" class="chzn-select">
<option value="27" data-company="The Price Is Right">Bob Barker</option>
<option value="28" data-company="Wheel Of Fortune">Pat Sajak</option>
<option value="29" data-company="Wheel Of Fortune">Vanna White</option>
<option value="30" data-company="Jeopardy">Alex Trebek</option>
<option value="31" data-company="Love Connection">Chuck Woolery</option>
</select> Typing "Bob" in the search would bring up Bob Barker Sometimes our sales execs know the client by name (text), other times they know the client by client number (value), often times they can't remember the client's name or number but they know they work for a certain company, so it would be great to show a list of all clients who work for companyX when searching. In the meantime, if you want this type of functionality, you have to put it all in the text of the option, which really clutters up some long lists and makes them difficult and ugly to view: <select id="customer" class="chzn-select">
<option value="27">Bob Barker - 27 - The Price Is Right</option>
<option value="28">Pat Sajak - 28 - Wheel of Fortune</option>
<option value="29">Vanna White - 29 - Wheel of Fortune</option>
<option value="30">Alex Trebek - 30 - Jeopardy</option>
<option value="31">Chuck Woolery - 31 - Love Connection</option>
</select> Searching by text and value would be a huge improvement and I could see many people needing and using that capability. Searching by text, value AND data attributes would just be over the top amazingly useful. |
@brockb In the meantime, you could use optgroups to group people by company. Searching on them is supported: |
@tjschuck I could see that having some benefit. It might not work so well for those lists where there are hundreds of companies and thousands of contacts, but I could definitely see it being of benefit for smaller lists. I can already see a few areas where I could implement that into existing applications. For example... department users: Search for "Customer Service" and it narrows it down to Michelle, Edward and Earl. That will come in real handy in the meantime. Thanks for pointing that out to me! I'll definitely put that to use for some of my smaller lists. I do hope we get value searching one of these days though. data-attribute searching may just be a pipe dream... but hey, one can dream, can't he? =) |
Quick question, is there any movement on this? +1 for this feature |
Done, made it real. |
So what's the status on this? I would love to search by option value as well. |
Is this feature done? |
#628 is worth looking at, maybe. Would add value, but would be helpful. |
Going on with this one #2796 |
Hi!
Please add capability to search in select lists not only by text but by value too.
For example,
And if I type "some" it should suggest me "text one".
The text was updated successfully, but these errors were encountered: