view table list in database widget

This commit is contained in:
Jan Prochazka
2021-02-21 09:57:26 +01:00
parent a03261bfd4
commit 71bea87a7a
8 changed files with 63 additions and 13 deletions

View File

@@ -1,8 +1,20 @@
<script lang="ts">
export let component;
export let data;
export let subItemsComponent;
export let expandOnClick;
let isExpanded = false;
function handleExpand() {
if (subItemsComponent && expandOnClick) {
isExpanded = !isExpanded;
}
}
</script>
<svelte:component this={component} {data} />
<svelte:component this={component} {data} on:click={handleExpand} />
{#if isExpanded && subItemsComponent}
<svelte:component this={subItemsComponent} {data} />
{/if}