telerik / kendo-react

Issue tracker - KendoReact http://www.telerik.com/kendo-react-ui/
https://kendo-react-teal.vercel.app
Other
211 stars 37 forks source link

[Bug][dropdowns] Keyboard navigation for duplicate items with a dataset of objects #2179

Open WissamProgress opened 6 months ago

WissamProgress commented 6 months ago

I'm submitting a...

Current behavior

The keyboard navigation is also broken when setting the data to an array of objects and having values of the duplicate textField values. This is the case for all components in the dropdowns package.

It happens because the focusedItemIndex that is used in the keyboard navigation takes the textField as an argument and uses it for focusing the items. It should take the whole item instead.

Expected behavior

They keyboard navigation in this case takes into consideration the dataItemKey and not the textField. It is also possible to add a prop that allows the user to configure this based on their needs.

Minimal reproduction of the problem with instructions

  1. Bind the data to an array of objects
  2. Set identical text values for the items
  3. Navigate through the items using the up and down arrow keys

https://stackblitz.com/edit/react-z7esrx-sjbhww?file=app%2Fmain.tsx

This item is related to #1752 where this bug was fixed in the case where the data is bound to primitive values.

filipKovachev commented 1 month ago

Also reported in ticket 1663774