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',
|
eventTrackingNamespace: folderUid ? 'manage_dashboards' : 'dashboard_search',
|
||||||
});
|
});
|
||||||
|
|
||||||
if (doInitialSearch) {
|
if (doInitialSearch && this.hasSearchFilters()) {
|
||||||
this.doSearch();
|
this.doSearch();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -81,9 +81,12 @@ export class SearchStateManager extends StateManagerBase<SearchState> {
|
|||||||
sort: this.state.sort,
|
sort: this.state.sort,
|
||||||
});
|
});
|
||||||
|
|
||||||
// issue new search query
|
// Prevent searching when user is only clearing the input.
|
||||||
|
// We don't show these results anyway
|
||||||
|
if (this.hasSearchFilters()) {
|
||||||
this.doSearchWithDebounce();
|
this.doSearchWithDebounce();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
onCloseSearch = () => {
|
onCloseSearch = () => {
|
||||||
this.updateLocation({
|
this.updateLocation({
|
||||||
|
Loading…
Reference in New Issue
Block a user