Skip to content

Conversation

@layonez
Copy link

@layonez layonez commented Nov 26, 2025

Thank you for your contribution! 👏

Fixes: #12727

PR checklist

For example: fix(ui5-*): correct/fix sth or feat(ui5-*): add/introduce sth. If you don't want the change to be part of the release changelog - use chore, refactor or docs.

  • 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 merged
or Related to: {#PR_NUMBER} to just create a link between the PR and the issue.


Background

When using ComboBox with the noTypeahead property 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 as noTypeahead is intended to disable autocomplete/auto-selection behavior, providing only filtering functionality.

Changes

Modified the _selectMatchingItem() method in ComboBox.ts to skip auto-selection during active filtering when noTypeahead=true.

Implementation details:

  • Added conditional logic to detect active filtering state:
    • Input is focused
    • User has typed a value
    • No explicit selection has been made yet (!_selectionPerformed)
    • Not navigating with keyboard arrows (!_isKeyNavigation)
  • When noTypeahead=true and the above conditions are met, auto-selection is skipped
  • Preserved all existing functionality:
    • Explicit selections via clicks still work
    • Enter key with keyboard navigation still works
    • Keyboard arrow navigation still triggers selection (as intended)
    • Default behavior when noTypeahead=false remains unchanged

Testing

Added 5 comprehensive Cypress test cases covering:

  • ✅ No auto-selection during filtering when noTypeahead=true
  • ✅ Explicit click selection works correctly
  • ✅ Keyboard navigation + Enter key selection works
  • ✅ Keyboard navigation alone triggers selection (expected behavior)
  • ✅ Default behavior validation when noTypeahead=false

@cla-assistant
Copy link

cla-assistant bot commented Nov 26, 2025

CLA assistant check
All committers have signed the CLA.

@layonez layonez force-pushed the combobox-autoselect-fix branch from b3dd05e to d3f9efc Compare November 26, 2025 15:38
@nnaydenow
Copy link
Contributor

Hi @UI5/ui5-team-ctr-ril,

Please take a look

@nnaydenow nnaydenow requested a review from a team November 26, 2025 20:30
@layonez
Copy link
Author

layonez commented Nov 28, 2025

@MapTo0 @ndeshev @StefanDimitrov04 Hi folks, I've seen you recently reviewed/worked on combobox component, could you please take a look at this small bugfix when you'll have some time 🙏

@mavo
Copy link

mavo commented Dec 10, 2025

Hello, its been now 2 weeks, without any reaction in this PR whatsoever. This is not really helpful, as we are currently stuck and cannot proceed with our project, hence having bad UX because the component is not usable right now which mades us being stuck with a dropdown that simply shows all options.

What do we need to do in order to get progress here?

I am tagging random ppls that contributed to this repo, as I want to get someone to at least take a look so that this is not just forgotten.
@MapTo0 @ndeshev @StefanDimitrov04 @ilhan007 @vladitasev @pskelin @tsanislavgatev

@hristop
Copy link
Contributor

hristop commented Dec 10, 2025

@mavo as i have written in the issue itself - i have conveyed this to our designers. They have not provided timeline, but they said that this needs to be discussed on their internal round and they will come back to me once they do so. I will get back to you then.

This is something that may be considered backward incompatible, thus we need to be backed up by the design area. We have already checked the code and once we hear from them we can quickly act - either approve or reject the pull request.

The request has not been forgotten, it needs to be discussed and synced in a larger round as there are other technologies that use this components and all design representatives consulted.

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

Successfully merging this pull request may close these issues.

[ComboBox]: Auto-Selection triggers with noTypeahead

4 participants