mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
BrowseDashboards: Prevent unnecessary searches (#76424)
This commit is contained in:
parent
e743aa54b8
commit
685b494e05
@ -57,7 +57,7 @@ export class SearchStateManager extends StateManagerBase<SearchState> {
|
||||
eventTrackingNamespace: folderUid ? 'manage_dashboards' : 'dashboard_search',
|
||||
});
|
||||
|
||||
if (doInitialSearch) {
|
||||
if (doInitialSearch && this.hasSearchFilters()) {
|
||||
this.doSearch();
|
||||
}
|
||||
}
|
||||
@ -81,8 +81,11 @@ export class SearchStateManager extends StateManagerBase<SearchState> {
|
||||
sort: this.state.sort,
|
||||
});
|
||||
|
||||
// issue new search query
|
||||
this.doSearchWithDebounce();
|
||||
// Prevent searching when user is only clearing the input.
|
||||
// We don't show these results anyway
|
||||
if (this.hasSearchFilters()) {
|
||||
this.doSearchWithDebounce();
|
||||
}
|
||||
}
|
||||
|
||||
onCloseSearch = () => {
|
||||
|
Loading…
Reference in New Issue
Block a user