Updated search function to hide dropdown on no query.

The dropdown still displays when all text is cut from the input box (CTRL+A, CTRL+X) so, for some data sources, the 'searching' text then displays indefinitely. This change removes the dropdown when the search field is empty.