From e22d75eb1c1d20d598cc33a2e9f6708201bf3b03 Mon Sep 17 00:00:00 2001 From: Jacob Pihl Date: Wed, 1 Nov 2023 12:07:01 +0100 Subject: [PATCH] Added disabled state A user should no be able to trigger the delete materials modal, if no materials have been selected. This adds a simple check for that. --- src/apps/dashboard/modal/ReservationsGroupModal.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/apps/dashboard/modal/ReservationsGroupModal.tsx b/src/apps/dashboard/modal/ReservationsGroupModal.tsx index 1dd0ae321c..2b8e388822 100644 --- a/src/apps/dashboard/modal/ReservationsGroupModal.tsx +++ b/src/apps/dashboard/modal/ReservationsGroupModal.tsx @@ -148,7 +148,7 @@ const ReservationGroupModal: FC = ({ } })} buttonType="none" - disabled={false} + disabled={!materialsToDelete.length} collapsible={false} size="small" variant="filled"