diff --git a/client/src/components/Grid/GridList.vue b/client/src/components/Grid/GridList.vue index d0b3bae9f051..7a9e57784bb5 100644 --- a/client/src/components/Grid/GridList.vue +++ b/client/src/components/Grid/GridList.vue @@ -82,6 +82,9 @@ const filterClass = props.gridConfig.filtering; const rawFilters = computed(() => Object.fromEntries(filterClass.getFiltersForText(filterText.value, true, false))); const validFilters = computed(() => filterClass.getValidFilters(rawFilters.value, true).validFilters); const invalidFilters = computed(() => filterClass.getValidFilters(rawFilters.value, true).invalidFilters); +const hasInvalidFilters = computed( + () => Object.keys(invalidFilters.value).length > 0 && Object.keys(validFilters.value).length > 0 +); // hide message helper const hideMessage = useDebounceFn(() => { @@ -116,7 +119,7 @@ async function getGridData() { resultsLoading.value = true; selected.value = new Set(); if (props.gridConfig) { - if (Object.keys(invalidFilters.value).length > 0) { + if (hasInvalidFilters.value) { // there are invalid filters, so we don't want to search initDataLoading.value = false; resultsLoading.value = false; @@ -221,7 +224,7 @@ function onSelectAll(current: boolean): void { */ function validatedFilterText() { // there are no filters derived from the `filterText`; return the `filterText` as is - if (Object.keys(rawFilters.value).length === 0) { + if (Object.keys(rawFilters.value).length === 0 || Object.keys(validFilters.value).length === 0) { return filterText.value; } // there are valid filters derived from the `filterText` @@ -291,8 +294,8 @@ watch(operationMessage, () => {