diff --git a/src/components/grid/DataGrid.vue b/src/components/grid/DataGrid.vue index 831fe975f..c42c9f1aa 100644 --- a/src/components/grid/DataGrid.vue +++ b/src/components/grid/DataGrid.vue @@ -424,9 +424,10 @@ watch(() => props.result.columns.length, initColumnWidths); const pageSize = ref(100); const currentPage = ref(1); const isFullPage = computed(() => props.result.rows.length >= pageSize.value); -const canUseWhereSearch = computed(() => !!props.tableMeta && !!props.onExecuteSql); +const isResultsContext = computed(() => props.context === "results"); +const canUseWhereSearch = computed(() => !!props.tableMeta && !!props.onExecuteSql && !isResultsContext.value); const isWhereSearch = computed(() => canUseWhereSearch.value && /^\s*where\b/i.test(searchText.value)); -const wherePredicate = computed(() => normalizeWhereInput(searchText.value)); +const wherePredicate = computed(() => (canUseWhereSearch.value ? normalizeWhereInput(searchText.value) : undefined)); const activeWhereInput = computed(() => (isWhereSearch.value && wherePredicate.value ? searchText.value : undefined)); const clientSearchText = computed(() => (isWhereSearch.value ? "" : searchText.value)); @@ -1285,14 +1286,8 @@ defineExpose({
-
- +
+