Skip to content

useComboBox + useAsyncList does not show results after a call that was after a call that returned an empty list #9820

@davidalvarezr

Description

@davidalvarezr

Provide a general summary of the issue here

We use Asynchronous loading with useComboBox.

We use useAsyncList as shown in the documentation.

When we write something and the API returns no results, the next call does not update the comonent items, even if there are matching results.

We thought it was a bug on our side but we saw that the provided example had the same problem.

🤔 Expected Behavior?

Pressing "backspace" after writing "luka" should show "Luke Skywalker"

😯 Current Behavior

Pressing "backspace" after writing "luka" still doesn't show the results

💁 Possible Solution

No response

🔦 Context

No response

🖥️ Steps to Reproduce

  1. Go to the documentation example: https://react-aria.adobe.com/ComboBox/useComboBox.html#asynchronous-loading
  2. Write "luka" --> no suggestions, because nothing matches "luka"
  3. Press "backspace" --> the HTTP call is made, there is a response, but the ListBox inside the popover does not get updated:
Image

Version

react-aria-components 1.15.1

What browsers are you seeing the problem on?

Chrome

If other, please specify.

No response

What operating system are you using?

Windows 11

🧢 Your Company/Team

No response

🕷 Tracking Issue

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions