From 4ea616f1cd0a2a52cbfa50c19c0aaced203a7302 Mon Sep 17 00:00:00 2001 From: Lakhan Baheti <94619783+1akhanBaheti@users.noreply.github.com> Date: Wed, 20 Mar 2024 18:07:11 +0530 Subject: [PATCH] fix: Labels overflow in peek, detail view (#3995) --- .../issues/issue-detail/label/create-label.tsx | 17 +++++++++++++---- .../issue-detail/label/select/label-select.tsx | 2 +- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/web/components/issues/issue-detail/label/create-label.tsx b/web/components/issues/issue-detail/label/create-label.tsx index f20fa4721..160ff0071 100644 --- a/web/components/issues/issue-detail/label/create-label.tsx +++ b/web/components/issues/issue-detail/label/create-label.tsx @@ -7,6 +7,8 @@ import { IIssueLabel } from "@plane/types"; // hooks import { Input, TOAST_TYPE, setToast } from "@plane/ui"; import { useIssueDetail } from "@/hooks/store"; +// helpers +import { cn } from "helpers/common.helper"; // ui // types import { TLabelOperations } from "./root"; @@ -29,6 +31,7 @@ export const LabelCreate: FC = (props) => { // hooks const { issue: { getIssueById }, + peekIssue, } = useIssueDetail(); // state const [isCreateToggle, setIsCreateToggle] = useState(false); @@ -82,13 +85,13 @@ export const LabelCreate: FC = (props) => { {isCreateToggle && ( -
+
( - + <> {value && value?.trim() !== "" && ( @@ -110,8 +113,14 @@ export const LabelCreate: FC = (props) => { leaveFrom="opacity-100 translate-y-0" leaveTo="opacity-0 translate-y-1" > - - onChange(value.hex)} /> + + onChange(value.hex)} + /> diff --git a/web/components/issues/issue-detail/label/select/label-select.tsx b/web/components/issues/issue-detail/label/select/label-select.tsx index 1bacb34be..2882a1e0e 100644 --- a/web/components/issues/issue-detail/label/select/label-select.tsx +++ b/web/components/issues/issue-detail/label/select/label-select.tsx @@ -56,7 +56,7 @@ export const IssueLabelSelect: React.FC = observer((props) => query === "" ? options : options?.filter((option) => option.query.toLowerCase().includes(query.toLowerCase())); const { styles, attributes } = usePopper(referenceElement, popperElement, { - placement: "bottom-start", + placement: "bottom-end", modifiers: [ { name: "preventOverflow",