Skip to content

[RAC] Virtualizer does not work properly in a Combobox #8943

@GustavoHenriqueP

Description

@GustavoHenriqueP

Provide a general summary of the issue here

Looks like a very specific and conditional bug. When using Virtualizer in a ListBox with dynamic content (Inside a Combobox), it blocks the selection of items if:

  1. The list was scrolled before
    and
  2. The content of the list was altered to the point where there's no overflow in Y axis anymore.

🤔 Expected Behavior?

The user can select an Item on the list, even if the list was altered to very few items.

😯 Current Behavior

It's not possible to select an Item if the conditions mentioned above have been met.

💁 Possible Solution

No response

🔦 Context

I am trying to build a SearchBar (With Combobox) using a virtualized list and infinite scrolling.

🖥️ Steps to Reproduce

Image

CodeSandbox link: https://codesandbox.io/p/devbox/v8sg88.

  1. Scroll the ListBox a bit
  2. Narrow the search to the point it does not overflows the Y axis: Search number 600, for example
  3. Observe that we cannot select an item anymore.

Version

react-aria-components 1.12.2

What browsers are you seeing the problem on?

Chrome

If other, please specify.

No response

What operating system are you using?

Windows 11 Version-10.0.26100

🧢 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