Refactor DbKeyDetailTab and related components to handle item changes

This commit is contained in:
Stela Augustinova
2025-12-23 14:22:31 +01:00
parent 4c12ee3b14
commit 7281ee1565
6 changed files with 177 additions and 16 deletions

View File

@@ -38,6 +38,12 @@
function addRecord() {
records = [...records, { value: '' }];
if (onChangeItem) {
onChangeItem({
...item,
records: records,
});
}
}
</script>
@@ -56,6 +62,12 @@
<div class="delete-wrapper col-1">
<button class="delete-button" on:click={() => {
records = records.filter((_, idx) => idx !== index);
if (onChangeItem) {
onChangeItem({
...item,
records: records,
});
}
}}>
<FontIcon icon="icon delete" />
</button>