Skip to content

Combo with array type value key #14103

@wnvko

Description

@wnvko

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.

Metadata

Metadata

Assignees

Labels

🐛 bugAny issue that describes a bug✅ status: resolvedApplies to issues that have pending PRs resolving them, or PRs that have already merged.

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions