`showResults` is called all the time when updating the results or paging, and the code from here until the end of the function should be called only once after a search is done.