Files
headlessui/packages/@headlessui-react
Robin Malfait 706f42b9d7 Bubble Escape event even if Combobox.Options is not rendered at all (#1104)
* bubble Escape event even if `Combobox.Options` is not rendered at all

If you use `<Combobox.Options static />` it means that you are in
control of rendering and in that case we also bubble the `Escape`
because you are in control of it.

However, if you do something like this:
```js
{filteredList.length > 0 && (
  <Combobox.Options static>
    ...
  </Combobox.Options>
)}
```
Then whenever the `filteredList` is empty, the Combobox.Options are not
rendered at all which means that we can't look at the `static` prop. To
fix this, we also bubble the `Escape` event if we don't have a
`Combobox.Options` at all so that the above example works as expected.

* update changelog
2022-02-11 15:24:30 +01:00
..
2022-01-31 00:10:06 +01:00
2022-01-31 12:29:27 +01:00
2022-01-31 00:10:06 +01: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
npm install @headlessui/react

# Yarn
yarn add @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