Not able to set value of combo in reactive form
Description
I have a combo in reactive form. In the form builder I am setting initial value for the combo related form control.
- igniteui-angular version: 16.1.0
- browser: all
Steps to reproduce
Check this Stackblitz sample - https://stackblitz.com/edit/rucvus?file=src%2Fapp%2Fhow-to%2Freactive-forms%2Freactive-forms.component.ts,package.json.
Result
Combo has no initial values selected.
Expected result
Combo should have initial values selected.
There has been no recent activity and this issue has been marked inactive.
@wnvko @dkamburov I'm not that familiar with the combo, but looking at the docs: https://www.infragistics.com/products/ignite-ui-angular/angular/components/combo#two-way-binding
It seems that the bindings expect just an array of the simple value associated with the valueKey in the data, so instead of the whole complex object:
genres: [[{ type: 'Action' }, { type: 'Crime' }]],
Maybe it should be just the string value:
genres: [['Action', 'Crime']],
And in that case it gets sets as expected: https://stackblitz.com/edit/rucvus-qegyvi Let me know if that solves your issue or if I'm missing something.
Sounds reasonable to me. @wnvko does that work for you? Please re-open it if we are missing something.