Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/storage/storage.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,11 @@
await model.removeItem(key);
};
const onTapSave = async (key: string) => {
model.setItem(editingKey, editingVal); // set value anyway
if (editingKey !== key) {
await model.removeItem(key); // dirty key
}
model.setItem(editingKey, editingVal); // set value anyway

resetEditState(); // reset editing status
};
const onTapEdit = async (key: string, value: string, i: number) => {
Expand Down Expand Up @@ -77,7 +78,7 @@
<div class="vc-table-col">{k}</div>
<div class="vc-table-col vc-table-col-2">{properDisplay(v)}</div>
{/if}

<div class="vc-table-col vc-table-col-1 vc-table-action">
{#if editingIdx === i}
<Icon name="cancel" on:click={onTapCancelEdit} />
Expand Down