mirror of
https://github.com/makeplane/plane
synced 2024-06-14 14:31:34 +00:00
fix: filter menu not closing on select other parent option (#587)
This commit is contained in:
parent
653cc29290
commit
10657d4796
@ -100,8 +100,7 @@ export const MultiLevelDropdown: React.FC<MultiLevelDropdownProps> = ({
|
|||||||
)}
|
)}
|
||||||
</Menu.Item>
|
</Menu.Item>
|
||||||
{option.children && option.id === openChildFor && (
|
{option.children && option.id === openChildFor && (
|
||||||
<Menu.Items
|
<div
|
||||||
static
|
|
||||||
className={`absolute top-0 w-36 origin-top-right select-none overflow-y-scroll rounded-md bg-white shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none ${
|
className={`absolute top-0 w-36 origin-top-right select-none overflow-y-scroll rounded-md bg-white shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none ${
|
||||||
direction === "left"
|
direction === "left"
|
||||||
? "right-full -translate-x-1"
|
? "right-full -translate-x-1"
|
||||||
@ -120,24 +119,21 @@ export const MultiLevelDropdown: React.FC<MultiLevelDropdownProps> = ({
|
|||||||
>
|
>
|
||||||
<div className="space-y-1 p-1">
|
<div className="space-y-1 p-1">
|
||||||
{option.children.map((child) => (
|
{option.children.map((child) => (
|
||||||
<Menu.Item
|
<button
|
||||||
key={child.id}
|
key={child.id}
|
||||||
as="button"
|
|
||||||
type="button"
|
type="button"
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
onSelect(child.value);
|
onSelect(child.value);
|
||||||
}}
|
}}
|
||||||
className={({ active }) =>
|
className={`${
|
||||||
`${
|
child.selected ? "bg-gray-100" : "text-gray-900"
|
||||||
active || child.selected ? "bg-gray-100" : "text-gray-900"
|
} flex w-full items-center break-all rounded px-1 py-1.5 text-left capitalize hover:bg-gray-100`}
|
||||||
} flex w-full items-center break-all rounded px-1 py-1.5 text-left capitalize`
|
|
||||||
}
|
|
||||||
>
|
>
|
||||||
{child.label}
|
{child.label}
|
||||||
</Menu.Item>
|
</button>
|
||||||
))}
|
))}
|
||||||
</div>
|
</div>
|
||||||
</Menu.Items>
|
</div>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
))}
|
))}
|
||||||
|
Loading…
Reference in New Issue
Block a user