react-spectrum
react-spectrum copied to clipboard
ComboBox input clears when the text inside it is longer than its width and starts to scroll horizontally
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
- Go to this codesandbox
- Try typing "Strawberry" into the input
- 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