From b70f212e0931da517d0d2eaba3b849288eeb085b Mon Sep 17 00:00:00 2001 From: Nassim Tabchiche Date: Fri, 27 Sep 2024 18:17:19 +0200 Subject: [PATCH] Add a random uuid at the end of confirm modal id This prevents conflicting ids in the case there are multiple confirm modals that can be triggered on the same page. --- frontend/src/lib/components/Modals/ConfirmModal.svelte | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/src/lib/components/Modals/ConfirmModal.svelte b/frontend/src/lib/components/Modals/ConfirmModal.svelte index 6e225e710..7653f26af 100644 --- a/frontend/src/lib/components/Modals/ConfirmModal.svelte +++ b/frontend/src/lib/components/Modals/ConfirmModal.svelte @@ -21,9 +21,9 @@ import SuperForm from '$lib/components/Forms/Form.svelte'; - const { form, enhance } = superForm(_form, { + const { form } = superForm(_form, { dataType: 'json', - id: 'confirm-modal-form' + id: `confirm-modal-form-${crypto.randomUUID()}` }); // Base Classes