From 80874c77c7ac5b41324ced1398a839d1f9a0977c Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Fri, 10 Nov 2023 10:56:15 +0100 Subject: [PATCH] Hide/show app users on search --- .../DatasourceNavigator.svelte | 23 ++++++++++++------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/packages/builder/src/components/backend/DatasourceNavigator/DatasourceNavigator.svelte b/packages/builder/src/components/backend/DatasourceNavigator/DatasourceNavigator.svelte index 8ba131cd84..e30483d8eb 100644 --- a/packages/builder/src/components/backend/DatasourceNavigator/DatasourceNavigator.svelte +++ b/packages/builder/src/components/backend/DatasourceNavigator/DatasourceNavigator.svelte @@ -209,18 +209,25 @@ const viewV2Table = options.find(x => x._id === viewsV2.selected?.tableId) return viewV2Table != null } + + const appUsersTableName = "App users" + $: showAppUsersTable = + !searchTerm || + appUsersTableName.toLowerCase().indexOf(searchTerm.toLowerCase()) > -1 {#if $database?._id}
- selectTable(TableNames.USERS)} - selectedBy={$userSelectedResourceMap[TableNames.USERS]} - /> + {#if showAppUsersTable} + selectTable(TableNames.USERS)} + selectedBy={$userSelectedResourceMap[TableNames.USERS]} + /> + {/if} {#each enrichedDataSources.filter(ds => ds.show) as datasource}