ui: Add button to remove an unwanted object

This commit is contained in:
nemunaire 2024-01-17 18:10:24 +01:00
parent 8052370e6b
commit 271e49135b
1 changed files with 12 additions and 1 deletions

View File

@ -94,9 +94,20 @@
{#each innerSpecs as spec, i}
<TabPane
tabId={spec.id}
tab={spec.label}
active={i == 0}
>
<span slot="tab">
{spec.label}
{#if innerSpecs && value[spec.id] !== undefined && !spec.required}
<button
class="btn btn-link btn-sm pe-0 text-muted"
type="button"
on:click={() => { value[spec.id] = undefined; value = value; } }
>
<Icon name="trash" />
</button>
{/if}
</span>
{#if innerSpecs && value[spec.id] === undefined}
<div class="my-3 d-flex justify-content-center">
<Button