tailwindlabs / headlessui

Completely unstyled, fully accessible UI components, designed to integrate beautifully with Tailwind CSS.
https://headlessui.com
MIT License
25.81k stars 1.07k forks source link

Dropdown components are missing prop "modal" #3192

Closed areriklq closed 4 months ago

areriklq commented 4 months ago

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 commented 4 months ago

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

RobinMalfait commented 4 months ago

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!