Open jmyrland opened 1 week ago
What package within Headless UI are you using?
@headlessui/react
What version of that package are you using?
2.1.0
What browser are you using?
Chrome
Reproduction URL
See the sandbox
Describe your issue
When using Popover nested inside a p-element, the following warning is logged in the console:
Popover
p
Warning: validateDOMNesting(...): <div> cannot appear as a descendant of <p>.
As you can see in the sandbox, all of the popover components use as="span", but there is an empty div rendered within the Popover causing this issue:
as="span"
div
Is this empty div-element critical for the popover to work, or is there a way to opt out from this element?
What package within Headless UI are you using?
@headlessui/react
What version of that package are you using?
2.1.0
What browser are you using?
Chrome
Reproduction URL
See the sandbox
Describe your issue
When using
Popover
nested inside ap
-element, the following warning is logged in the console:As you can see in the sandbox, all of the popover components use
as="span"
, but there is an emptydiv
rendered within thePopover
causing this issue:Is this empty
div
-element critical for the popover to work, or is there a way to opt out from this element?