Hide search box if select is empty#2828
Conversation
Fix #2282. When a select box is empty (this appends in my case, I have a dynamic select box), the search box should not be shown.
|
I think you have the wrong ticket number. Can you also create a pair of jsfiddles that demonstrate the issues and the fix (using the changes here) so we can review this quicker? |
|
I had indeed the wrong ticket numer, sorry... |
|
Unfortunately this doesn't appear to hide the search box for me. I forked the jsfiddle and pulled in the code on this branch: http://jsfiddle.net/ydgne173/ Both fiddles give the same result under Chrome 39. |
|
Thanks for your time. |
|
My bad, I completely missed that it wasn't pointing at the right branch. I've also created a jsfiddle that tests that the fix doesn't hide the search when there is text in the search field. |
Hide search box if select is empty
|
This commit is creating a "Uncaught TypeError: this.showSearch is not a function" when using the latest stable/3.5 branch. See #1311 (same issue already fixed in the past) |
|
I think this is an unfortunate change, because if createSearchChoice() is provided, the search box should be visible in order for the user to enter the desired text. What about changing: this.showSearch(search.val()); with: this.showSearch(search.val() || this.opts.createSearchChoice); |

Fix #2822.
When a select box is empty (this appends in my case, I have a dynamic select box), the search box should not be shown.