Not sure if this has been covered somewhere, but I couldn't find it in the documentation, and was wondering if it'd be possible to not include the search input box with the jQuery chosen plugin (used to style select inputs). Specifically I'd like to use the standard select one without it.
相关问题
- Is there a limit to how many levels you can nest i
- How to toggle on Order in ReactJS
- How to fix IE ClearType + jQuery opacity problem i
- void before promise syntax
- jQuery add and remove delay
Well I tried with the documentation as well and no luck, so I finally fixed to this
I do the above after I call chosen. Hope this helps
Since none of the chosen-settings for hiding the search-field for multiple selects seemed to be working, I hacked the chosen.jquery.js in line 577 to:
(Span instead of the input field). Needed to comment out this line, too
Working fine for me - even though its not the best practice to hack the code.
With the latest Version of chosen only that works for me:
If the number of element of the select is smaller than disable_search_threshold (here 2 and less), the search box will not display.
Just a quick follow-up: I noticed that in function
a variable is read from
So you can disable the search-field with
without using a fixed-number threshold.