Skip to content

[combobox] undefined values after async items load #4032

@wadeamaral

Description

@wadeamaral

Bug report

Current behavior

Getting weird behavior when rendering a controlled combobox. The StackBlitz is taken directly from the docs Input Inside Popup converted to controlled. I am simulating a network call to set the item data however we are currently using TanStack Query to do so. If a user clicks the popup trigger before the items have been set, we are getting undefined values in the isItemEqualToValue method and Combobox.List.

chrome_3JBjQ3PPVk.mp4

Reproducible example

Link to StackBlitz.

Base UI version

v1.1

Which browser are you using?

Chrome

Which OS are you using?

Windows

Metadata

Metadata

Assignees

No one assigned

    Labels

    component: comboboxChanges related to the combobox component.type: bugIt doesn't behave as expected.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions