From 0c8dc087cabe32cacab44b8956737de03ef63027 Mon Sep 17 00:00:00 2001 From: rasmusq Date: Tue, 25 Nov 2025 20:53:04 +0100 Subject: [PATCH] fix: add item form now syncs with its correstonding toggle button correctly --- .../components/wishlist/WishlistActionButtons.svelte | 11 +++-------- src/routes/wishlist/[token]/edit/+page.svelte | 1 + 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/src/lib/components/wishlist/WishlistActionButtons.svelte b/src/lib/components/wishlist/WishlistActionButtons.svelte index 275903c..498ec9e 100644 --- a/src/lib/components/wishlist/WishlistActionButtons.svelte +++ b/src/lib/components/wishlist/WishlistActionButtons.svelte @@ -5,19 +5,14 @@ let { rearranging = $bindable(false), + showAddForm = false, onToggleAddForm }: { rearranging: boolean; + showAddForm?: boolean; onToggleAddForm: () => void; } = $props(); - let showAddForm = $state(false); - - function toggleAddForm() { - showAddForm = !showAddForm; - onToggleAddForm(); - } - function toggleRearranging() { rearranging = !rearranging; } @@ -25,7 +20,7 @@