Hide/show app users on search
This commit is contained in:
parent
3829797e3c
commit
80874c77c7
1 changed files with 15 additions and 8 deletions
|
@ -209,18 +209,25 @@
|
||||||
const viewV2Table = options.find(x => x._id === viewsV2.selected?.tableId)
|
const viewV2Table = options.find(x => x._id === viewsV2.selected?.tableId)
|
||||||
return viewV2Table != null
|
return viewV2Table != null
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const appUsersTableName = "App users"
|
||||||
|
$: showAppUsersTable =
|
||||||
|
!searchTerm ||
|
||||||
|
appUsersTableName.toLowerCase().indexOf(searchTerm.toLowerCase()) > -1
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
{#if $database?._id}
|
{#if $database?._id}
|
||||||
<div class="hierarchy-items-container">
|
<div class="hierarchy-items-container">
|
||||||
<NavItem
|
{#if showAppUsersTable}
|
||||||
icon="UserGroup"
|
<NavItem
|
||||||
text="App users"
|
icon="UserGroup"
|
||||||
selected={$isActive("./table/:tableId") &&
|
text={appUsersTableName}
|
||||||
$tables.selected?._id === TableNames.USERS}
|
selected={$isActive("./table/:tableId") &&
|
||||||
on:click={() => selectTable(TableNames.USERS)}
|
$tables.selected?._id === TableNames.USERS}
|
||||||
selectedBy={$userSelectedResourceMap[TableNames.USERS]}
|
on:click={() => selectTable(TableNames.USERS)}
|
||||||
/>
|
selectedBy={$userSelectedResourceMap[TableNames.USERS]}
|
||||||
|
/>
|
||||||
|
{/if}
|
||||||
{#each enrichedDataSources.filter(ds => ds.show) as datasource}
|
{#each enrichedDataSources.filter(ds => ds.show) as datasource}
|
||||||
<NavItem
|
<NavItem
|
||||||
border
|
border
|
||||||
|
|
Loading…
Reference in a new issue