SAP / fundamental-ngx

Fundamental Library for Angular is SAP Design System Angular component library
https://sap.github.io/fundamental-ngx
Apache License 2.0
264 stars 126 forks source link

Combobox Unwanted Auto Selected When Similar Dropdown Items #10902

Open desaroxx opened 10 months ago

desaroxx commented 10 months ago

Is this a bug, enhancement, or feature request?

bug

Describe your proposal.

No autoselection of dropdown items is performed

Can you handle that on the application side

Which versions of Angular and Fundamental Library for Angular are affected? Please, specify the exact version. (If this is a feature request, use current version.)

If this is a bug, please provide steps for reproducing it; the exact components you are using;

This is a continuation of #10429

With fix provided #10570 the following case is fixed:

Case 1: Identical names Dropdown menu items:

  1. Banana
  2. Banana

Steps to Reproduce:

  1. Enter "Banan" in the search field
  2. add letter "n" to the search field
  3. none of the "Banana" items get selected

Case 2: Extending Names Dropdown menu items:

  1. Banana
  2. Banana Shake

Steps to Reproduce:

  1. Enter "Banan" in the search field
  2. add letter "n" to the search field
  3. NOT EXPECTED: "Banana" items get selected, EXPECTED: "Banana" is not selected

Please provide relevant source code (if applicable).

Please provide stackblitz example(s).

In case this is Accessibility related topic, did you consult with an accessibility expert? If not, please do so and share their recommendations.

Did you check the documentation and the API?

Did you search for similar issues?

Is there anything else we should know?

We need this fix for 0.40.X

desaroxx commented 10 months ago

Case 1 behaves as expected, but case 2 doesn't.

droshev commented 10 months ago

@desaroxx We tried both scenarios on 0.40.4 and both are working as expected (unless we didn't follow the exact steps). See the recordings case2 case1

desaroxx commented 10 months ago

I made a mistake in the initial statement above:

For step to it needs to be the letter "a" instead of "n"

I reproduced the issue here:

Screen Recording 2023-11-08 at 12 03 28

Note that "Banana" is set on the FormControl.value property as soon as the search query matches "Banana", but this is potentially a substring match for "Banana Shake"