Hide search box if select is empty

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.
Merge pull request #2828 from LudoZeGeek/patch-3

Hide search box if select is empty