Fixed search function for good by setting searchResults attribute when search is focused.