Files
headlessui/packages/@headlessui-react
Robin Malfait 07c9f1f711 Fix ListboxOptions being incorrectly marked as inert (#3466)
This PR fixes an issue where the `ListboxOptions` component was
incorrectly marked as `inert`.

We only mark the other elements on the page as `inert` once the
`Listbox` is in a visible state. The issue is that the
`data.optionsElement` (a reference to the DOM node) was not populated
with the actual DOM node yet at the time the `useInertOthers(…)` hook
was applied.

Due to the usage of `useEvent(…)`, instead of `useCallback(…)` the
internal `useEffect(…)` hook didn't re-run because the `allowed`
function was already stable.

With this fix, the `allowed` function will change whenever its
dependencies change.

Fixes: #3464
2024-09-09 21:09:48 +02:00
..
2022-01-31 00:10:06 +01:00
2024-03-12 16:25:13 +01:00
2024-09-04 16:36:30 +02:00

@headlessui/react

A set of completely unstyled, fully accessible UI components for React, designed to integrate beautifully with Tailwind CSS.

Total Downloads Latest Release License

Installation

npm install @headlessui/react

Documentation

For full documentation, visit headlessui.dev.

Community

For help, discussion about best practices, or any other conversation that would benefit from being searchable:

Discuss Headless UI on GitHub

For casual chit-chat with others using the library:

Join the Tailwind CSS Discord Server