From e2dbf1a2151a1f60df223bc729113b70e156cf8e Mon Sep 17 00:00:00 2001 From: "kasia.oczkowska" Date: Thu, 1 Aug 2024 08:40:54 +0100 Subject: [PATCH] fix: prevent removing last filter criteria --- .../src/components/FlowSubstep/FilterConditions/index.jsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/web/src/components/FlowSubstep/FilterConditions/index.jsx b/packages/web/src/components/FlowSubstep/FilterConditions/index.jsx index 9104e750..e015c83c 100644 --- a/packages/web/src/components/FlowSubstep/FilterConditions/index.jsx +++ b/packages/web/src/components/FlowSubstep/FilterConditions/index.jsx @@ -122,7 +122,7 @@ function FilterConditions(props) { {groups?.map((group, groupIndex) => ( - <> + {groupIndex !== 0 && } @@ -200,6 +200,7 @@ function FilterConditions(props) { edge="start" onClick={() => removeGroupItem(groupIndex, groupItemIndex)} sx={{ width: 61, height: 61 }} + disabled={groups.length === 1 && group.and.length === 1} > @@ -227,7 +228,7 @@ function FilterConditions(props) { )} - + ))}