From 3236f07f2f2b5a717bf1d73756d310fd6678bb2a Mon Sep 17 00:00:00 2001 From: "konveyor-ci-bot[bot]" <159171263+konveyor-ci-bot[bot]@users.noreply.github.com> Date: Wed, 4 Sep 2024 14:51:08 -0400 Subject: [PATCH] :bug: Close dropdown after selection or click outside the list (#2077) (#2078) Fix applies to bulk selection dropdown and to filter categories dropdown on all table-based screens. Resolves: https://issues.redhat.com/browse/MTA-3321 Backport-of: #2077 Signed-off-by: Radoslaw Szwajkowski Signed-off-by: Cherry Picker --- client/src/app/components/FilterToolbar/FilterToolbar.tsx | 1 + client/src/app/components/ToolbarBulkSelector.tsx | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/client/src/app/components/FilterToolbar/FilterToolbar.tsx b/client/src/app/components/FilterToolbar/FilterToolbar.tsx index c04803fa64..6c240ca962 100644 --- a/client/src/app/components/FilterToolbar/FilterToolbar.tsx +++ b/client/src/app/components/FilterToolbar/FilterToolbar.tsx @@ -203,6 +203,7 @@ export const FilterToolbar = ({ {!showFiltersSideBySide && ( setIsCategoryDropdownOpen(flag)} toggle={(toggleRef) => ( ({ { handleSelectAll(false); + setIsOpen(false); }} data-action="none" key="select-none" @@ -91,6 +92,7 @@ export const ToolbarBulkSelector = ({ currentPageItems.map((item: T) => item), true ); + setIsOpen(false); }} data-action="page" key="select-page" @@ -101,6 +103,7 @@ export const ToolbarBulkSelector = ({ { handleSelectAll(true); + setIsOpen(false); }} data-action="all" key="select-all" @@ -116,6 +119,7 @@ export const ToolbarBulkSelector = ({ setIsOpen(flag)} toggle={(toggleRef) => (