From a6d8318cf0fa5ed7741127e482f06d6cb3ad955a Mon Sep 17 00:00:00 2001 From: Maximilien Carbonne Date: Mon, 20 Jan 2025 18:54:00 +0100 Subject: [PATCH] PR #467 --- frontend/components/Base/Modal.vue | 12 +++++-- frontend/components/Form/Multiselect.vue | 7 ++-- frontend/components/Item/CreateModal.vue | 28 +++++++++------- frontend/components/Label/CreateModal.vue | 10 ++++-- frontend/components/Location/CreateModal.vue | 33 ++++++++++++++++--- .../components/global/QuickMenu/Input.vue | 20 +++++++---- .../components/global/QuickMenu/Modal.vue | 15 ++------- frontend/layouts/default.vue | 28 +++++++++++----- 8 files changed, 102 insertions(+), 51 deletions(-) diff --git a/frontend/components/Base/Modal.vue b/frontend/components/Base/Modal.vue index 6939f929c..b1ea21c22 100644 --- a/frontend/components/Base/Modal.vue +++ b/frontend/components/Base/Modal.vue @@ -41,6 +41,10 @@ type: Boolean, default: true, }, + clickOutsideToClose: { + type: Boolean, + default: false, + }, }); const modalBox = ref(); @@ -51,9 +55,11 @@ } } - onClickOutside(modalBox, () => { - close(); - }); + if (props.clickOutsideToClose) { + onClickOutside(modalBox, () => { + close(); + }); + } function close() { if (props.readonly) { diff --git a/frontend/components/Form/Multiselect.vue b/frontend/components/Form/Multiselect.vue index 91e1a27ad..ad67c6443 100644 --- a/frontend/components/Form/Multiselect.vue +++ b/frontend/components/Form/Multiselect.vue @@ -4,7 +4,10 @@ {{ label }}