From 3eea89b6d68a7ce3f4ca1933e207173e5ac35d1b Mon Sep 17 00:00:00 2001 From: biast12 Date: Tue, 24 Feb 2026 23:47:01 +0100 Subject: [PATCH] Fix save button validation not reliably reflecting input state Validation state from FormInputRow was not reliably reaching the parent Forms.svelte due to Svelte's $: blocks firing during component initialization before on: listeners are guaranteed to be attached. Fixes: - Add onMount dispatch in FormInputRow to guarantee initial validation state is sent after mount - Add hasValidationErrors guard in saveInputs() to block invalid saves regardless of button UI state - Assign stable _key to new inputs so inputValidationErrors uses a consistent key instead of the loop index, which shifts on reorder/delete --- frontend/src/components/manage/FormInputRow.svelte | 14 +++++++++++--- frontend/src/views/Forms.svelte | 9 +++++++-- 2 files changed, 18 insertions(+), 5 deletions(-) diff --git a/frontend/src/components/manage/FormInputRow.svelte b/frontend/src/components/manage/FormInputRow.svelte index 8974daf..a9cff06 100644 --- a/frontend/src/components/manage/FormInputRow.svelte +++ b/frontend/src/components/manage/FormInputRow.svelte @@ -1,5 +1,5 @@