fix(dashboard): Combobox should not disable body after being closed (#6909)
**What** - Fixes an issue where opening a Combobox inside a modal, and then closing the modal would result in the body preserving the `pointer-events: none;` style.
This commit is contained in:
@@ -258,7 +258,6 @@ const ComboboxImpl = <T extends Value = string>(
|
|||||||
</Popover.Anchor>
|
</Popover.Anchor>
|
||||||
<Popover.Portal>
|
<Popover.Portal>
|
||||||
<Popover.Content
|
<Popover.Content
|
||||||
asChild
|
|
||||||
align="center"
|
align="center"
|
||||||
side="bottom"
|
side="bottom"
|
||||||
sideOffset={8}
|
sideOffset={8}
|
||||||
@@ -322,6 +321,16 @@ const ComboboxImpl = <T extends Value = string>(
|
|||||||
</Popover.Content>
|
</Popover.Content>
|
||||||
</Popover.Portal>
|
</Popover.Portal>
|
||||||
</PrimitiveComboboxProvider>
|
</PrimitiveComboboxProvider>
|
||||||
|
{open && (
|
||||||
|
<div
|
||||||
|
tabIndex={-1}
|
||||||
|
aria-hidden="true"
|
||||||
|
data-aria-hidden="true"
|
||||||
|
data-state="open"
|
||||||
|
className="fixed inset-0 size-full"
|
||||||
|
onClick={() => setOpen(false)}
|
||||||
|
/>
|
||||||
|
)}
|
||||||
</Popover.Root>
|
</Popover.Root>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user