From 6124ba0271ed11ffca1c6f6937a39b928a1df403 Mon Sep 17 00:00:00 2001 From: Marco Pedone Date: Tue, 19 Aug 2025 16:47:12 +0200 Subject: [PATCH] Prevent closing dialog when announcements are selected in AddAnnuncio component --- .../src/components/servizio/servizio_actions.tsx | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/apps/infoalloggi/src/components/servizio/servizio_actions.tsx b/apps/infoalloggi/src/components/servizio/servizio_actions.tsx index 84e03f4..880d6a0 100644 --- a/apps/infoalloggi/src/components/servizio/servizio_actions.tsx +++ b/apps/infoalloggi/src/components/servizio/servizio_actions.tsx @@ -121,7 +121,14 @@ export const AddAnnuncio = ({ Annuncio - + { + if (selectedAnnunci.length !== 0) { + e.preventDefault(); // Prevent closing the dialog if there are selected announcements + } + }} + > Aggiungi annuncio