1
0

fix bug when removing process from list

This commit is contained in:
Rokas Puzonas 2023-04-17 21:07:40 +03:00
parent 838830d2e6
commit 1b4a7f3612

View File

@ -37,6 +37,13 @@
processess = newProcessess
selectedAdd = getAvailableProcessess()[0]
}
function removeRow(id) {
processess = processess.filter(row => row != id)
if (selectedAdd == undefined) {
selectedAdd = getAvailableProcessess()[0]
}
}
</script>
<div>
@ -52,9 +59,7 @@
icon={TrashCan}
iconDescription="Delete"
kind="danger-tertiary"
on:click={() => {
processess = processess.filter(row => row != id)
}}
on:click={() => removeRow(id)}
/>
</div>
{/each}