Skip to content

js/viewSelector: Cancel search on overview hiding

Currently when the overview is hidden, any pending search is kept alive, not only at remote search provider level (as per issue #183), but even the shell providers proxies continue to get and process data, even if this is not something needed anymore, while the UI reset is performed only next time that the overview is shown (also causing some more computation at presenting it).

In order to stop this to happen, when the overview is hiding, we have to unset the search entry to an empty value as this would make SearchResults to have empty terms list and that would make the proxies cancellable to be triggered.

To be more accurate in not doing unneeded operations at this stage, is better to split the old reset() function into stopSearch() and _resetSearchField(). While the first cancel the search in act, the second only operates on the search field cursor and selection (removing some duplication).


This will also be a prerequisite for #436 (closed)

Edited by Marco Trevisan

Merge request reports