fix(admin-tags): name clears after save and wrong confirmation text
Some checks failed
CI / Unit & Component Tests (pull_request) Failing after 2m30s
CI / Backend Unit Tests (pull_request) Failing after 2m45s
CI / Unit & Component Tests (push) Failing after 2m35s
CI / Backend Unit Tests (push) Failing after 2m44s

SvelteKit's use:enhance resets the form after a successful action.
The name input used value={data.tag.name} without bind:, so Svelte 5's
fine-grained reactivity did not re-apply the unchanged value after the
reset — leaving the field empty. Passing reset: false to update() fixes
this.

Also corrected the confirmation message from "renamed" to "saved" in
all three locales, since the action updates name, parent, and color.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit was merged in pull request #249.
This commit is contained in:
Marcel
2026-04-17 10:22:54 +02:00
parent 4442b25a7a
commit 3b1317af98
4 changed files with 4 additions and 4 deletions

View File

@@ -119,7 +119,7 @@ const colors = [
id="edit-tag-form"
method="POST"
action="?/update"
use:enhance
use:enhance={() => async ({ update }) => { await update({ reset: false }); }}
oninput={unsaved.markDirty}
class="mb-5"
>