-
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 supposed to support numeric input? #2968
Comments
You need to set the |
@bitwombat No worries — glad to help! As for the behavior you're seeing, that is strange! What browser, browser version, OS, and OS version are you using? And what version of Chosen? If not the latest version, does it still happen on the latest version? Can you link to a publicly accessible page (or a Fiddle) that shows the issue? |
Will put together a testcase and fill out the questions on your contributing guidelines... |
@bitwombat Thanks, that would be great! |
Good news - jsFiddle knows about v1.8.5. Bad news, the link they use to cloudflare is 404. This is 404 and this but not this Want me to make a new issue for that? |
@adunkman ^ Know anything about how those files end up there? Both of the versions you pushed today seem to not be currently working. |
Negatory… I assume a cron or something? But they seem to be working now! |
Alright, here we go: Steps to reproduceGo to Type "WHS" then "3" (no quotes) Compare with: I include both because they act differently. v1.6.1 highlights the first occurrence of "WHS", which makes the lack of matching of "WHS3" odd. However 1.8.5 highlights the occurrence of WHS in the description part of the option, which if that means it's not seeing the first part, would make sense that "WHS3" doesn't match anything. Expected behaviorChosen should not be matching the middle of the string without the search_contains option. With the current behavior which seems to be matching within the string anyway, Chosen should match BSBWHS302 Actual behaviorNo results are found. Environment
|
@bitwombat It looks like you're still missing the If you add Please let me know if I'm misunderstanding your issue, though! |
Correct. The issue is really that when the option is false, Chosen sort of, sometimes, matches things in the middle. |
@bitwombat That's actually the correct, fixed behavior. When you have the option set to PR #2692 is what fixed this behavior, and that fix was included in version 1.7.0. |
What if you must enter numbers only? I am using a list of ALL numeric characters such as: 0400000010469004 Which gives: I would like the users to only have to enter a partial of the number (eg. 68814) and get a result set, instead I get: Chosen v1.8.7 / JQuery 3.3.1 / IE11 (Windows 10 Enterprise) |
@MB-VictoryRider See my answer above here: You need to set the |
I did set it: if you try searching for 468 it doesn't find anything. |
Did anyone find the solution to the problem: all numerical options not searching from middle even with search_contains set to true ? |
Hi,
Using v1.8.2, I have options that have numbers in them (eg. WHS301) and I find I can search for 'W' (or 'WH' or 'WHS'), but not '301'.
Is this meant to be? I had a thumb through the source but couldn't find what I was looking for.
I will create a testcase if this is not the intended behavior.
The text was updated successfully, but these errors were encountered: