From 3efb63cac52145536f665dcf4825cb5f5f01bde4 Mon Sep 17 00:00:00 2001 From: Radoslaw Szwajkowski Date: Wed, 4 Sep 2024 16:43:58 +0200 Subject: [PATCH] Close dropdown after selection or click outside the list Signed-off-by: Radoslaw Szwajkowski --- 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) => (