ui: Add button to remove an unwanted object
This commit is contained in:
parent
8052370e6b
commit
271e49135b
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue