feat(ComboBox): implement noTypeahead behavior to skip auto-selection during filtering #12728
+158
−1
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Thank you for your contribution! 👏
Fixes: #12727
PR checklist
Check the Development Hints
Follow the Commit message Guidelines
For example:
fix(ui5-*): correct/fix sthorfeat(ui5-*): add/introduce sth. If you don't want the change to be part of the release changelog - usechore,refactorordocs.Add proper description about the background of the change and the change itself
Link to an existing issue (if available)
Use
Fixes: {#PR_NUMBER}to close the issue automatically when the PR is mergedor
Related to: {#PR_NUMBER}to just create a link between the PR and the issue.Background
When using ComboBox with the
noTypeaheadproperty enabled, items were being automatically selected as the user typed, even though the expected behavior is to only allow explicit user selection. This created confusion asnoTypeaheadis intended to disable autocomplete/auto-selection behavior, providing only filtering functionality.Changes
Modified the
_selectMatchingItem()method inComboBox.tsto skip auto-selection during active filtering whennoTypeahead=true.Implementation details:
!_selectionPerformed)!_isKeyNavigation)noTypeahead=trueand the above conditions are met, auto-selection is skippednoTypeahead=falseremains unchangedTesting
Added 5 comprehensive Cypress test cases covering:
noTypeahead=truenoTypeahead=false