88b068cff1
* move `nullable` handling to `onChange` of `Combobox.Input` itself We were specifically handling backspace/delete keys to verify if the `Combobox.Input` becomes empty then we can clear the value if we are in single value and in nullable mode. However, this doesn't capture other ways of clearing the `Combobox.Input`, for example when use `cmd+x` or `ctrl+y` in the input. Moving the logic, gives us some of these cases for free. * ensure pressing `escape` also clears the input in nullable, single value mode without an active value * adjust test to ensure we don't have a selected option instead of an active option We still will have an active option (because we default to the first option if nothing is active while the combobox is open). But since we cleared the value when using the `nullable` prop, then it means the `selected` option should be cleared. * ensure `input` event is fired when firing keydown events * ensure `defaultToFirstOption` is always set when going to an option We recently made a Vue improvement that delayed the going to an option, but this also included a bug where the `defaultToFirstOption` was not set at the right time anymore. * update changelog * fix `than` / `then` typo
@headlessui/react
A set of completely unstyled, fully accessible UI components for React, designed to integrate beautifully with Tailwind CSS.
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:
For casual chit-chat with others using the library: