Skip to content

Conversation

@adrian-bobev
Copy link
Contributor

Summary

When typing text that doesn't trigger typeahead autocomplete (e.g., "k" or "and"), the filter incorrectly used a stale valueBeforeAutoComplete instead of the actual typed value, causing wrong suggestions to appear.

Symptoms:

  • Typing "k" showed all items instead of only "The United Kingdom..." (matching "Kingdom")
  • Typing "and" showed items matching "a" (Albania, Argentina) instead of items with word "and"

Root Cause:
The condition this._shouldAutocomplete || !!autoCompletedChars caused filtering to use valueBeforeAutoComplete even when there was no actual autocomplete. The _shouldAutocomplete flag is true during normal typing, but valueBeforeAutoComplete only updates when typeahead finds a match.

Fix:
Only use valueBeforeAutoComplete when there are actually autocompleted characters selected (autoCompletedChars > 0).

Test Plan

  • Added Cypress test for "k" scenario (no typeahead match, but filter match)
  • Added Cypress test for "and" scenario (typeahead match on first char, then no match)
  • All existing MultiComboBox tests pass

…ypeahead

When typing text that doesn't trigger typeahead (e.g. "k" or "and"),
the filter incorrectly used stale valueBeforeAutoComplete instead of
the actual typed value, causing wrong suggestions to appear.

Fixes:
- Typing "k" showed all items instead of only matching "Kingdom"
- Typing "and" showed items matching "a" instead of matching "and"
@cla-assistant
Copy link

cla-assistant bot commented Jan 28, 2026

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@ui5-webcomponents-bot
Copy link
Collaborator

ui5-webcomponents-bot commented Jan 28, 2026

@ui5-webcomponents-bot ui5-webcomponents-bot temporarily deployed to preview January 28, 2026 22:04 Inactive
@adrian-bobev adrian-bobev requested a review from niyap January 28, 2026 22:07
@ui5-webcomponents-bot ui5-webcomponents-bot temporarily deployed to preview January 29, 2026 21:30 Inactive
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.

3 participants