liuy97 / ng2-input-autocomplete

angular2 input autocomplete
https://liuy97.github.io/ng2-input-autocomplete/
MIT License
7 stars 5 forks source link

Can you show us example using reactive forms with formarray #9

Closed jagabs closed 5 years ago

liuy97 commented 5 years ago

do you get any error? If you want to use this component in formarray, you can use example https://stackblitz.com/angular/odkjqqmqboy?file=src%2Fapp%2Fprofile-editor%2Fprofile-editor.component.html

you have to update value with index.

onSelect(item: any, i: number) {
    this.selectedItem = item;
    this.aliases.at(i).patchValue(item);
  }
jagabs commented 5 years ago

its okay now, i accessed it manually in on select. expenseFormGroup.controls["expenseDirectoryName"].setValue(item.expenseDirectoryName); Thanks.

liuy97 commented 5 years ago

it is nice that the issue gets resolved.