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

Bubble Escape event even if Combobox.Options is not rendered at all #1104

Merged
merged 2 commits into from
Feb 11, 2022

Commits on Feb 11, 2022

  1. 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.
    RobinMalfait committed Feb 11, 2022
    Configuration menu
    Copy the full SHA
    a902dd9 View commit details
    Browse the repository at this point in the history
  2. update changelog

    RobinMalfait committed Feb 11, 2022
    Configuration menu
    Copy the full SHA
    440ff29 View commit details
    Browse the repository at this point in the history