igniteui-angular icon indicating copy to clipboard operation
igniteui-angular copied to clipboard

Combo with array type value key

Open wnvko opened this issue 1 year ago • 0 comments

Description

I have a combo where valueKye is pointing to an array of items. Whatever item is selected combo is showing the same value in its input.

  • igniteui-angular version: 17.1.0
  • browser: all

Steps to reproduce

My data is a collection of item like this one:

interface ClassName{
  item: string;
  value: number[];
}

I am setting up the combo like this:

<igx-combo [data]="myData" valueKey="value" displayKey="description">
</igx-combo>

Result

Whichever item I select in the combo it is showing description of the first item. In selectionChanging I have this:

  • displayText is showing coma separated descriptions only of the firs item in my data, e.g. Item 1, Item 1, Item 1, even if I select some other items in the combo.
  • added, if any, is always pointing to the first item in my data.
  • removed, if any, is always pointing to the first item in my data.
  • newSelection is an array containing first item of my data several times.
  • oldSelection is an array containing first item of my data several times.
  • newValue and oldValue are correct.

Expected result

Combo's input should show correct display text and selectionChanging should emit correct values for all its fields.

wnvko avatar Apr 12 '24 21:04 wnvko