- try {
- const response = await this.services.groupsService.contents('', getParams(dataExplorer, searchValue));
- api.dispatch(updateResources(response.items));
- api.dispatch(setItems(response));
- } catch {
- api.dispatch(couldNotFetchWorkflows());
+ const { cluster: clusterId } = getAdvancedDataFromQuery(searchValue);
+ const sessions = getSearchSessions(clusterId, state.auth.sessions);
+
+ if (searchValue.trim() === '') {
+ return;
+ }
+
+ const params = getParams(dataExplorer, searchValue);
+
+ const initial = {
+ itemsAvailable: 0,
+ items: [] as GroupContentsResource[],
+ kind: '',
+ offset: 0,
+ limit: 10
+ };
+
+ if (criteriaChanged) {
+ api.dispatch(setItems(initial));