Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multi select with FormArray #419

Open
guzmo opened this issue Mar 27, 2018 · 0 comments
Open

Multi select with FormArray #419

guzmo opened this issue Mar 27, 2018 · 0 comments

Comments

@guzmo
Copy link

guzmo commented Mar 27, 2018

Hi,

I've been trying to hook up multi select to a FormArray of Objects, so far without any luck.
How to connect a select to an FormArray of objects?
Below is a code snippet, a bit masked but shouldn't matter.

<select formControlName="myArray" multiple materialize="material_select" [materializeSelectOptions]="my.options">
     <option *ngFor="let opt of my.options" [selected]="selectedOpt(opt)" [value]="opt">{{opt.name}}</option>
</select>

The form is being initialized on the fly but I've tried adding this.optionsAction.emit('material_select') after, and it didn't help.

Any help would be appreciated!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant