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

ComboBox input clears when the text inside it is longer than its width and starts to scroll horizontally #6362

Open
nkalpak opened this issue May 10, 2024 · 0 comments

Comments

@nkalpak
Copy link

nkalpak commented May 10, 2024

Provide a general summary of the issue here

When rendering the ComboBox as it is directly taken from the starter kit, when you write enough text inside the input to overflow horizontally, the entire input will reset.

🤔 Expected Behavior?

The input shouldn't reset

😯 Current Behavior

The input resets

💁 Possible Solution

I've investigated a bit and found the code in useComboBoxState.ts:237 to look suspicious. When adding both the selectedKey and inputValue to make the ComboBox controlled, the input is no longer cleared.

🔦 Context

No response

🖥️ Steps to Reproduce

  1. Go to this codesandbox
  2. Try typing "Strawberry" into the input
  3. Observe that the input is cleared when you reach the point that the text starts overflowing horizontally

Version

1.2.0

What browsers are you seeing the problem on?

Firefox, Chrome, Safari, Microsoft Edge

If other, please specify.

No response

What operating system are you using?

MacOS

🧢 Your Company/Team

No response

🕷 Tracking Issue

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant