igniteui-angular
igniteui-angular copied to clipboard
Combo with array type value key
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:
-
displayTextis 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. -
newSelectionis an array containing first item of my data several times. -
oldSelectionis an array containing first item of my data several times. -
newValueandoldValueare correct.
Expected result
Combo's input should show correct display text and selectionChanging should emit correct values for all its fields.