From 88023b3784641578b42eeffc212c85b3872d47bb Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Thu, 9 Nov 2023 15:12:17 +0100 Subject: [PATCH] Apply filters --- .../DatasourceNavigator/DatasourceNavigator.svelte | 7 +++++-- .../builder/src/components/common/SearchBox.svelte | 4 ++-- .../builder/app/[application]/data/_layout.svelte | 10 ++++++++-- 3 files changed, 15 insertions(+), 6 deletions(-) diff --git a/packages/builder/src/components/backend/DatasourceNavigator/DatasourceNavigator.svelte b/packages/builder/src/components/backend/DatasourceNavigator/DatasourceNavigator.svelte index 0cc61c69e6..dac0e7af74 100644 --- a/packages/builder/src/components/backend/DatasourceNavigator/DatasourceNavigator.svelte +++ b/packages/builder/src/components/backend/DatasourceNavigator/DatasourceNavigator.svelte @@ -22,6 +22,7 @@ import { TableNames } from "constants" import { userSelectedResourceMap } from "builderStore" + export let searchTerm let openDataSources = [] $: enrichedDataSources = enrichDatasources( @@ -209,9 +210,11 @@ {/if} - {#if datasource.open} + {#if datasource.open || searchTerm} - {#each $queries.list.filter(query => query.datasourceId === datasource._id) as query} + {#each $queries.list.filter(query => query.datasourceId === datasource._id && (!searchTerm || query.name + ?.toLowerCase() + ?.indexOf(searchTerm.toLowerCase()) > -1)) as query} - + - + {/if}