From 93abff5a4b2434dfaef51411ab428bd311169eba Mon Sep 17 00:00:00 2001 From: Anmol Singh Bhatia <121005188+anmolsinghbhatia@users.noreply.github.com> Date: Tue, 14 Nov 2023 18:29:39 +0530 Subject: [PATCH] chore: no lead option added in lead select dropdown (#2774) --- web/components/modules/select/lead.tsx | 11 ++++++ web/components/workspace/member-select.tsx | 46 +++++++++++++--------- 2 files changed, 39 insertions(+), 18 deletions(-) diff --git a/web/components/modules/select/lead.tsx b/web/components/modules/select/lead.tsx index 84da54748..ccff72a37 100644 --- a/web/components/modules/select/lead.tsx +++ b/web/components/modules/select/lead.tsx @@ -6,6 +6,7 @@ import { ProjectMemberService } from "services/project"; // ui import { Avatar, CustomSearchSelect } from "@plane/ui"; // icons +import { Combobox } from "@headlessui/react"; import { UserCircle } from "lucide-react"; // fetch-keys import { PROJECT_MEMBERS } from "constants/fetch-keys"; @@ -59,6 +60,16 @@ export const ModuleLeadSelect: React.FC = ({ value, onChange }) => { )} } + footerOption={ + + + No Lead + + + } onChange={onChange} noChevron /> diff --git a/web/components/workspace/member-select.tsx b/web/components/workspace/member-select.tsx index bae16de01..26b76845d 100644 --- a/web/components/workspace/member-select.tsx +++ b/web/components/workspace/member-select.tsx @@ -95,27 +95,37 @@ export const WorkspaceMemberSelect: FC = (props) => {
{filteredOptions ? ( filteredOptions.length > 0 ? ( - filteredOptions.map((workspaceMember: IWorkspaceMember) => ( + <> + {filteredOptions.map((workspaceMember: IWorkspaceMember) => ( + + `flex items-center justify-between gap-2 cursor-pointer select-none truncate rounded px-1 py-1.5 ${ + active && !selected ? "bg-custom-background-80" : "" + } ${selected ? "text-custom-text-100" : "text-custom-text-200"}` + } + > + {({ selected }) => ( + <> +
+ + {workspaceMember.member.display_name} +
+ {selected && } + + )} +
+ ))} - `flex items-center justify-between gap-2 cursor-pointer select-none truncate rounded px-1 py-1.5 ${ - active && !selected ? "bg-custom-background-80" : "" - } ${selected ? "text-custom-text-100" : "text-custom-text-200"}` - } + value="" + className="flex items-center justify-between gap-2 cursor-pointer select-none truncate rounded px-1 py-1.5 text-custom-text-200" > - {({ selected }) => ( - <> -
- - {workspaceMember.member.display_name} -
- {selected && } - - )} + + No Lead +
- )) + ) : (

No matching results