Files
windmill/frontend/src/lib/components/apps/editor/TablePanel.svelte
T
2023-02-24 17:49:16 +01:00

22 lines
673 B
Svelte

<script lang="ts">
import { getContext } from 'svelte'
import type { AppEditorContext } from '../types'
import type { TableComponent } from './component'
import ComponentPanel from './settingsPanel/ComponentPanel.svelte'
export let component: TableComponent
const { selectedComponent } = getContext<AppEditorContext>('AppEditorContext')
</script>
{#each component.actionButtons as actionButton (actionButton.id)}
{#if actionButton.id === $selectedComponent}
<ComponentPanel
rowColumns
bind:component={actionButton}
onDelete={() => {
component.actionButtons = component.actionButtons.filter((c) => c.id !== actionButton.id)
}}
/>
{/if}
{/each}