Using an anchor
(or portal
) with ListboxOptions
doesn't work with Radix UI’s Dialog
#3715
Unanswered
oriyan-ovadia
asked this question in
Help
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
What package within Headless UI are you using?
@headlessui/react
What version of that package are you using?
v2.2.2
What browser are you using?
Chrome
Codesandbox
https://codesandbox.io/p/sandbox/jolly-wescoff-ypj3ym
Describe your issue
I'm using Radix UI's
Dialog
in my app, and also using Headless UI'sListbox
. I ran into a problem where if I apply aportal
to theListboxOptions
(either directly or viaanchor
, which does it automatically), the dropdown stops working, I can't select anything. If I don’t useanchor
, everything works fine.Just wondering if anyone else has run into this and found a workaround. I’m considering switching over to Headless UI's
Dialog
, but honestly, that’s a pretty big change for me right now.Preview
With anchor
preview.-.with.anchor.mov
Without anchor
preview.-.without.anchor.mov
Beta Was this translation helpful? Give feedback.
All reactions