1
0
mirror of https://github.com/garraflavatra/rolens.git synced 2025-07-18 14:04:04 +00:00

Save queries

This commit is contained in:
2023-02-15 17:00:53 +01:00
parent 3291bc845f
commit 5f358885a3
12 changed files with 419 additions and 37 deletions

View File

@ -96,9 +96,12 @@
contextMenu.show(evt, item.menu);
}
function removeItem(index) {
items.splice(index, 1);
items = items;
function removeItem(index, itemKey) {
if (Array.isArray(items)) {
items.splice(index, 1);
items = items;
}
dispatch('removeItem', itemKey);
}
function formatValue(value) {
@ -167,7 +170,7 @@
{#if canRemoveItems}
<td class="has-button">
<button class="btn-sm" type="button" on:click={() => removeItem(index)}>
<button class="btn-sm" type="button" on:click|stopPropagation={() => removeItem(index, item[key])} on:dblclick|stopPropagation>
<Icon name="x" />
</button>
</td>