Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dropdown components are missing prop "modal" #3192

Closed
areriklq opened this issue May 10, 2024 · 2 comments
Closed

Dropdown components are missing prop "modal" #3192

areriklq opened this issue May 10, 2024 · 2 comments

Comments

@areriklq
Copy link

What package within Headless UI are you using?

@headlessui/react

What version of that package are you using?

@headlessui/react 2.0.3

What browser are you using?

Edge/Chromium

Reproduction URL

N/A

Describe your issue
Release notes for 2.x says:

Dropdown components are now modal by default
The Menu, Combobox, and Listbox dropdowns are now rendered modal by default. When the dropdown is open the page is scroll-locked and all other page content is made inert.

While this is generally recommended behavior for these components, you can disable this using the modal prop:

- <Combobox ...>
+ <Combobox modal={false} ...>

However, I am unable to find the modal prop on the Listbox component:
image

Am I doing something wrong or is this a defect?

(The changed behavior is causing regressions for me as users now need to click twice to toggle a control after they have opened a multi-select Listbox.)

@areriklq areriklq changed the title Dropdown components are missing pop Dropdown components are missing prop "modal" May 10, 2024
@areriklq
Copy link
Author

I found the prop now, but on ListboxOptions . I did not expect that given the release documentation.

@RobinMalfait
Copy link
Collaborator

Hey!

That was a mistake on our end, I've updated the release notes. You can also find the available props in the API documentation on the docs website. https://headlessui.com/react/listbox#listbox-options

Sorry about that, and hope it helps!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants