|
|
@ -5,6 +5,7 @@ |
|
|
|
|
|
|
|
|
export let selectedRows |
|
|
export let selectedRows |
|
|
export let deleteRows |
|
|
export let deleteRows |
|
|
|
|
|
export let item = "row" |
|
|
|
|
|
|
|
|
const dispatch = createEventDispatcher() |
|
|
const dispatch = createEventDispatcher() |
|
|
let modal |
|
|
let modal |
|
|
@ -14,12 +15,14 @@ |
|
|
modal?.hide() |
|
|
modal?.hide() |
|
|
dispatch("updaterows") |
|
|
dispatch("updaterows") |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
$: text = `${item}${selectedRows?.length === 1 ? "" : "s"}` |
|
|
</script> |
|
|
</script> |
|
|
|
|
|
|
|
|
<Button icon="Delete" size="s" primary quiet on:click={modal.show}> |
|
|
<Button icon="Delete" size="s" primary quiet on:click={modal.show}> |
|
|
Delete |
|
|
Delete |
|
|
{selectedRows.length} |
|
|
{selectedRows.length} |
|
|
row(s) |
|
|
{text} |
|
|
</Button> |
|
|
</Button> |
|
|
<ConfirmDialog |
|
|
<ConfirmDialog |
|
|
bind:this={modal} |
|
|
bind:this={modal} |
|
|
@ -29,5 +32,5 @@ |
|
|
> |
|
|
> |
|
|
Are you sure you want to delete |
|
|
Are you sure you want to delete |
|
|
{selectedRows.length} |
|
|
{selectedRows.length} |
|
|
row{selectedRows.length > 1 ? "s" : ""}? |
|
|
{text}? |
|
|
</ConfirmDialog> |
|
|
</ConfirmDialog> |
|
|
|