From 56e41527563605a826fa0548b55a0b58a40a7865 Mon Sep 17 00:00:00 2001 From: Anmol Singh Bhatia <121005188+anmolsinghbhatia@users.noreply.github.com> Date: Thu, 2 Nov 2023 16:28:07 +0530 Subject: [PATCH] fix: select label dropdown fix for list view (#2608) --- .../issue-layouts/properties/labels.tsx | 106 +++++++++--------- 1 file changed, 55 insertions(+), 51 deletions(-) diff --git a/web/components/issues/issue-layouts/properties/labels.tsx b/web/components/issues/issue-layouts/properties/labels.tsx index d9c9d3826..d54b67a9c 100644 --- a/web/components/issues/issue-layouts/properties/labels.tsx +++ b/web/components/issues/issue-layouts/properties/labels.tsx @@ -88,6 +88,59 @@ export const IssuePropertyLabels: React.FC = observer((pro ], }); + const label = ( +
+ {value.length > 0 ? ( + value.length <= maxRender ? ( + <> + {(projectLabels ? projectLabels : []) + ?.filter((l) => value.includes(l.id)) + .map((label) => ( +
+
+ + {label.name} +
+
+ ))} + + ) : ( +
+ value.includes(l.id)) + .map((l) => l.name) + .join(", ")} + > +
+ + {`${value.length} Labels`} +
+
+
+ ) + ) : ( +
+ Select labels +
+ )} +
+ ); + return ( = observer((pro } ${buttonClassName}`} onClick={() => fetchProjectLabels()} > -
- {value.length > 0 ? ( - value.length <= maxRender ? ( - <> - {(projectLabels ? projectLabels : []) - ?.filter((l) => value.includes(l.id)) - .map((label) => ( -
-
- - {label.name} -
-
- ))} - - ) : ( -
- value.includes(l.id)) - .map((l) => l.name) - .join(", ")} - > -
- - {`${value.length} Labels`} -
-
-
- ) - ) : ( -
- Select labels -
- )} -
+ {label} {!hideDropdownArrow && !disabled &&