forked from github/plane
chore: create issue modal improvement (#2960)
This commit is contained in:
parent
f3f71f4f9e
commit
1ef0a86c9d
@ -104,24 +104,39 @@ export const IssueCycleSelect: React.FC<IssueCycleSelectProps> = observer((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((option) => (
|
<>
|
||||||
|
{filteredOptions.map((option) => (
|
||||||
|
<Combobox.Option
|
||||||
|
key={option.value}
|
||||||
|
value={option.value}
|
||||||
|
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" : ""
|
||||||
|
} w-full truncate ${selected ? "text-custom-text-100" : "text-custom-text-200"}`
|
||||||
|
}
|
||||||
|
>
|
||||||
|
{({ selected }) => (
|
||||||
|
<>
|
||||||
|
{option.content}
|
||||||
|
{selected && <Check className="h-3.5 w-3.5 flex-shrink-0" />}
|
||||||
|
</>
|
||||||
|
)}
|
||||||
|
</Combobox.Option>
|
||||||
|
))}
|
||||||
<Combobox.Option
|
<Combobox.Option
|
||||||
key={option.value}
|
key="none"
|
||||||
value={option.value}
|
value=""
|
||||||
className={({ active, selected }) =>
|
className={({ active }) =>
|
||||||
`flex items-center justify-between gap-2 cursor-pointer select-none truncate rounded px-1 py-1.5 ${
|
`flex items-center justify-between gap-2 ${
|
||||||
active && !selected ? "bg-custom-background-80" : ""
|
active ? "bg-custom-background-80" : ""
|
||||||
} w-full truncate ${selected ? "text-custom-text-100" : "text-custom-text-200"}`
|
} cursor-pointer select-none truncate rounded px-1 py-1.5 w-full text-custom-text-100`
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
{({ selected }) => (
|
<div className="flex items-center gap-1.5 truncate">
|
||||||
<>
|
<span className="truncate flex-grow">None</span>
|
||||||
{option.content}
|
</div>
|
||||||
{selected && <Check className="h-3.5 w-3.5 flex-shrink-0" />}
|
|
||||||
</>
|
|
||||||
)}
|
|
||||||
</Combobox.Option>
|
</Combobox.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>
|
||||||
|
@ -98,24 +98,39 @@ export const IssueModuleSelect: React.FC<IssueModuleSelectProps> = observer((pro
|
|||||||
<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((option) => (
|
<>
|
||||||
|
{filteredOptions.map((option) => (
|
||||||
|
<Combobox.Option
|
||||||
|
key={option.value}
|
||||||
|
value={option.value}
|
||||||
|
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" : ""
|
||||||
|
} w-full truncate ${selected ? "text-custom-text-100" : "text-custom-text-200"}`
|
||||||
|
}
|
||||||
|
>
|
||||||
|
{({ selected }) => (
|
||||||
|
<>
|
||||||
|
{option.content}
|
||||||
|
{selected && <Check className="h-3.5 w-3.5 flex-shrink-0" />}
|
||||||
|
</>
|
||||||
|
)}
|
||||||
|
</Combobox.Option>
|
||||||
|
))}
|
||||||
<Combobox.Option
|
<Combobox.Option
|
||||||
key={option.value}
|
key="none"
|
||||||
value={option.value}
|
value=""
|
||||||
className={({ active, selected }) =>
|
className={({ active }) =>
|
||||||
`flex items-center justify-between gap-2 cursor-pointer select-none truncate rounded px-1 py-1.5 ${
|
`flex items-center justify-between gap-2 ${
|
||||||
active && !selected ? "bg-custom-background-80" : ""
|
active ? "bg-custom-background-80" : ""
|
||||||
} w-full truncate ${selected ? "text-custom-text-100" : "text-custom-text-200"}`
|
} cursor-pointer select-none truncate rounded px-1 py-1.5 w-full text-custom-text-100`
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
{({ selected }) => (
|
<div className="flex items-center gap-1.5 truncate">
|
||||||
<>
|
<span className="truncate flex-grow">None</span>
|
||||||
{option.content}
|
</div>
|
||||||
{selected && <Check className="h-3.5 w-3.5 flex-shrink-0" />}
|
|
||||||
</>
|
|
||||||
)}
|
|
||||||
</Combobox.Option>
|
</Combobox.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