mirror of
https://github.com/makeplane/plane
synced 2024-06-14 14:31:34 +00:00
chore: added default state for issues (#840)
This commit is contained in:
parent
e23075b7b9
commit
3e436179fe
@ -48,6 +48,7 @@ export const IssueStateSelect: React.FC<Props> = ({ setIsOpen, value, onChange,
|
|||||||
}));
|
}));
|
||||||
|
|
||||||
const selectedOption = states?.find((s) => s.id === value);
|
const selectedOption = states?.find((s) => s.id === value);
|
||||||
|
const currentDefaultState = states.find((s) => s.default);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<CustomSearchSelect
|
<CustomSearchSelect
|
||||||
@ -58,11 +59,12 @@ export const IssueStateSelect: React.FC<Props> = ({ setIsOpen, value, onChange,
|
|||||||
<div className="flex items-center gap-2 text-gray-500">
|
<div className="flex items-center gap-2 text-gray-500">
|
||||||
{selectedOption ? (
|
{selectedOption ? (
|
||||||
getStateGroupIcon(selectedOption.group, "16", "16", selectedOption.color)
|
getStateGroupIcon(selectedOption.group, "16", "16", selectedOption.color)
|
||||||
|
) : currentDefaultState ? (
|
||||||
|
getStateGroupIcon(currentDefaultState.group, "16", "16", currentDefaultState.color)
|
||||||
) : (
|
) : (
|
||||||
<Squares2X2Icon className="h-4 w-4" />
|
<Squares2X2Icon className="h-4 w-4" />
|
||||||
)}
|
)}
|
||||||
|
{selectedOption?.name ? selectedOption.name : currentDefaultState?.name ?? "State"}
|
||||||
{selectedOption?.name ?? "State"}
|
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
footerOption={
|
footerOption={
|
||||||
|
Loading…
Reference in New Issue
Block a user