Ugly implementation of search bar autocomplete