mirror of
https://github.com/makeplane/plane
synced 2024-06-14 14:31:34 +00:00
chore: no lead option added in lead select dropdown (#2774)
This commit is contained in:
parent
43e7c10eb7
commit
6797df239d
@ -6,6 +6,7 @@ import { ProjectMemberService } from "services/project";
|
|||||||
// ui
|
// ui
|
||||||
import { Avatar, CustomSearchSelect } from "@plane/ui";
|
import { Avatar, CustomSearchSelect } from "@plane/ui";
|
||||||
// icons
|
// icons
|
||||||
|
import { Combobox } from "@headlessui/react";
|
||||||
import { UserCircle } from "lucide-react";
|
import { UserCircle } from "lucide-react";
|
||||||
// fetch-keys
|
// fetch-keys
|
||||||
import { PROJECT_MEMBERS } from "constants/fetch-keys";
|
import { PROJECT_MEMBERS } from "constants/fetch-keys";
|
||||||
@ -59,6 +60,16 @@ export const ModuleLeadSelect: React.FC<Props> = ({ value, onChange }) => {
|
|||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
|
footerOption={
|
||||||
|
<Combobox.Option
|
||||||
|
value=""
|
||||||
|
className="flex items-center justify-between gap-2 cursor-pointer select-none truncate rounded px-1 py-1.5 text-custom-text-200"
|
||||||
|
>
|
||||||
|
<span className="flex items-center justify-start gap-1 text-custom-text-200">
|
||||||
|
<span>No Lead</span>
|
||||||
|
</span>
|
||||||
|
</Combobox.Option>
|
||||||
|
}
|
||||||
onChange={onChange}
|
onChange={onChange}
|
||||||
noChevron
|
noChevron
|
||||||
/>
|
/>
|
||||||
|
@ -95,27 +95,37 @@ export const WorkspaceMemberSelect: FC<IWorkspaceMemberSelect> = (props) => {
|
|||||||
<div className={`mt-2 space-y-1 max-h-48 overflow-y-scroll`}>
|
<div className={`mt-2 space-y-1 max-h-48 overflow-y-scroll`}>
|
||||||
{filteredOptions ? (
|
{filteredOptions ? (
|
||||||
filteredOptions.length > 0 ? (
|
filteredOptions.length > 0 ? (
|
||||||
filteredOptions.map((workspaceMember: IWorkspaceMember) => (
|
<>
|
||||||
|
{filteredOptions.map((workspaceMember: IWorkspaceMember) => (
|
||||||
|
<Listbox.Option
|
||||||
|
key={workspaceMember.id}
|
||||||
|
value={workspaceMember}
|
||||||
|
className={({ active, 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"}`
|
||||||
|
}
|
||||||
|
>
|
||||||
|
{({ selected }) => (
|
||||||
|
<>
|
||||||
|
<div className="flex items-center gap-2">
|
||||||
|
<Avatar name={workspaceMember?.member.display_name} src={workspaceMember?.member.avatar} />
|
||||||
|
{workspaceMember.member.display_name}
|
||||||
|
</div>
|
||||||
|
{selected && <Check className="h-3.5 w-3.5" />}
|
||||||
|
</>
|
||||||
|
)}
|
||||||
|
</Listbox.Option>
|
||||||
|
))}
|
||||||
<Listbox.Option
|
<Listbox.Option
|
||||||
key={workspaceMember.id}
|
value=""
|
||||||
value={workspaceMember}
|
className="flex items-center justify-between gap-2 cursor-pointer select-none truncate rounded px-1 py-1.5 text-custom-text-200"
|
||||||
className={({ active, 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"}`
|
|
||||||
}
|
|
||||||
>
|
>
|
||||||
{({ selected }) => (
|
<span className="flex items-center justify-start gap-1 text-custom-text-200">
|
||||||
<>
|
<span>No Lead</span>
|
||||||
<div className="flex items-center gap-2">
|
</span>
|
||||||
<Avatar name={workspaceMember?.member.display_name} src={workspaceMember?.member.avatar} />
|
|
||||||
{workspaceMember.member.display_name}
|
|
||||||
</div>
|
|
||||||
{selected && <Check className="h-3.5 w-3.5" />}
|
|
||||||
</>
|
|
||||||
)}
|
|
||||||
</Listbox.Option>
|
</Listbox.Option>
|
||||||
))
|
</>
|
||||||
) : (
|
) : (
|
||||||
<span className="flex items-center gap-2 p-1">
|
<span className="flex items-center gap-2 p-1">
|
||||||
<p className="text-left text-custom-text-200 ">No matching results</p>
|
<p className="text-left text-custom-text-200 ">No matching results</p>
|
||||||
|
Loading…
Reference in New Issue
Block a user