Hide search box when there are no results

When minimumResultsForSearch is positive, search box is displayed when there are no results.
Duplicate of #508.