-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Closed
Description
Component
Combobox
Package version
9.68.3
React version
17.0.2
Environment
System:
OS: Windows 11 10.0.26200
CPU: (16) x64 11th Gen Intel(R) Core(TM) i7-11850H @ 2.50GHz
Memory: 22.37 GB / 63.71 GB
Browsers:
Chrome: 143.0.7499.193
Edge: Chromium (142.0.3595.94)
Firefox Developer Edition: 148.0 - C:\Program Files\Firefox Developer Edition\firefox.exeCurrent Behavior
When using controlled combobox, if user types in the input box after making a selection (if what they type isn't a prefix in the list of values) what they type gets dropped.
Expected Behavior
User input shouldn't be cleared. The onOptionSelect event shows optionText as empty so when updatng the value to this value it clears user input. The callbacks should provide a way to differentiate this case so that what user typed can be preserved.
Reproduction
https://stackblitz.com/edit/u56b6ceq?file=src%2Fexample.tsx
Steps to reproduce
- Click the second combobox (controlled section)
- select Wanda Howard
- Click second combobox again and select all of the text
- Type z
- Observe the user input has been dropped
I have just forked the Controlled example from combobox storybook. It also can be repro'd with the filtered example in the story book
Are you reporting an Accessibility issue?
None
Suggested severity
High - No workaround
Products/sites affected
Feedback for m365 products (like office/teams/outlook)
Are you willing to submit a PR to fix?
no
Validations
- Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
- The provided reproduction is a minimal reproducible example of the bug.
Reactions are currently unavailable