fix bug when removing process from list
This commit is contained in:
parent
838830d2e6
commit
1b4a7f3612
@ -37,6 +37,13 @@
|
|||||||
processess = newProcessess
|
processess = newProcessess
|
||||||
selectedAdd = getAvailableProcessess()[0]
|
selectedAdd = getAvailableProcessess()[0]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function removeRow(id) {
|
||||||
|
processess = processess.filter(row => row != id)
|
||||||
|
if (selectedAdd == undefined) {
|
||||||
|
selectedAdd = getAvailableProcessess()[0]
|
||||||
|
}
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
@ -52,9 +59,7 @@
|
|||||||
icon={TrashCan}
|
icon={TrashCan}
|
||||||
iconDescription="Delete"
|
iconDescription="Delete"
|
||||||
kind="danger-tertiary"
|
kind="danger-tertiary"
|
||||||
on:click={() => {
|
on:click={() => removeRow(id)}
|
||||||
processess = processess.filter(row => row != id)
|
|
||||||
}}
|
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
{/each}
|
{/each}
|
||||||
|
Loading…
Reference in New Issue
Block a user