From 3cef678fbf8c8fb803653b87191fc2325af13e04 Mon Sep 17 00:00:00 2001 From: Lior Keren Date: Tue, 26 Mar 2024 15:55:52 +0200 Subject: [PATCH] fix(RHINENG-4108): Filter reset when AddSystemsToGroupModal closes Link to issue: https://issues.redhat.com/browse/RHINENG-4108 --- src/components/GroupSystems/GroupSystems.js | 2 +- src/components/InventoryGroups/Modals/AddSystemsToGroupModal.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/GroupSystems/GroupSystems.js b/src/components/GroupSystems/GroupSystems.js index 905714306..eb288b6f1 100644 --- a/src/components/GroupSystems/GroupSystems.js +++ b/src/components/GroupSystems/GroupSystems.js @@ -141,7 +141,7 @@ const GroupSystems = ({ groupName, groupId }) => { hostGroupFilter, lastSeenFilter ); - }, []); + }, [addToGroupModalOpen]); const bulkSelectConfig = useBulkSelectConfig( selected, diff --git a/src/components/InventoryGroups/Modals/AddSystemsToGroupModal.js b/src/components/InventoryGroups/Modals/AddSystemsToGroupModal.js index 494ff874a..03efdd010 100644 --- a/src/components/InventoryGroups/Modals/AddSystemsToGroupModal.js +++ b/src/components/InventoryGroups/Modals/AddSystemsToGroupModal.js @@ -107,11 +107,11 @@ const AddSystemsToGroupModal = ({ const calculateSelected = () => (selected ? selected.size : 0); const handleModalClose = () => { - setIsModalOpen(false); if (calculateSelected() > 0) { dispatch(selectEntity(-1, false)); } dispatch(clearFilters()); + setIsModalOpen(false); }; const edgeParityInventoryListEnabled = useFeatureFlag(