Skip to content

[Bug]: ComboBox value is cleared when opening/closing the dropdown #20370

@JoshPF

Description

@JoshPF

Package

@carbon/react

Browser

Firefox, Chrome

Package version

v1.84.0

React version

v17.0.2

Description

When using the ComboBox component, the input is cleared after just opening and closing the dropdown menu, even without changing any values or blurring the field.

Additionally, the input is also reset to the previous value when entering text that doesn't match any options and blurring the field (and will be cleared completely if the field hadn't been modified before)

Reproduction/example

https://xoriajwvybgithub-grxm--5173--96435430.local-corp.webcontainer.io/

Steps to reproduce

In any ComboBox, first select an item if one is not already selected. Next, open the dropdown by clicking the carrot icon. Then, close the dropdown again by clicking the same carrot icon. Observe that the input has been cleared even though the user has not typed anything or blurred the field.

Suggested Severity

None

Application/PAL

No response

Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    Status

    ⏱ Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions