Skip to content

SearchView filtered items do not reappear on backspace #147

@karuhanga

Description

@karuhanga

Update

After a little more tinkering, It turns out the first part of the issue was coming from me checking if the the newText in when onQueryChanged is triggered is empty and not performing that search. Removing this solved Issue 1. This seems quite arbitrary though.

The second issue still persists.

Issue 1
Awesome tool.
I'm not sure what I'm doing wrong or if this is a bug.
The first time the SearchView is opened, the search methods properly trigger and results are properly presented when I call searchView.addSuggestions(suggestions). The issue however is with every subsequent search, the first results to be presented are those from the previous search, regardless of the query that is typed.

Issue 2
After items have been filtered by the search, for example when searching for search, when one gets to sea, hitting backspace, which should presumably trigger the search for and re-display the suggestions for se properly triggers the search, but keeps the suggestions for sea on the screen, even after calling searchView.clearSuggestions() and then searchView.addSuggestions(suggestions) until the search box is completely cleared and the search restarted.

I have turned off history via searchView.setShouldKeepHistory(false);

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions