From 3912f28592fd221942ab87efac6f95e37aa0c32a Mon Sep 17 00:00:00 2001 From: pankajvc Date: Mon, 7 Aug 2023 14:40:15 +0530 Subject: [PATCH] fix :label filter should show something if there is no label #1779 --- .../components/ui/multi-level-dropdown.tsx | 46 ++++++++++--------- 1 file changed, 25 insertions(+), 21 deletions(-) diff --git a/apps/app/components/ui/multi-level-dropdown.tsx b/apps/app/components/ui/multi-level-dropdown.tsx index 9a4ebdbe427..096e32ca894 100644 --- a/apps/app/components/ui/multi-level-dropdown.tsx +++ b/apps/app/components/ui/multi-level-dropdown.tsx @@ -125,27 +125,31 @@ export const MultiLevelDropdown: React.FC = ({ > {option.children ? (
- {option.children.map((child) => { - if (child.element) return child.element; - else - return ( - - ); - })} + {option.children.length === 0 ? ( +

No {option.label} found

//if no children found, show this message. + ) : ( + option.children.map((child) => { + if (child.element) return child.element; + else + return ( + + ); + }) + )}
) : (