#Select/Deselect all options mat-list-item

14 messages · Page 1 of 1 (latest)

vague nimbus
vague nimbus
#

Select/Deselect all options mat-list-item

novel root
#

There are a couple errors in your approach:

  1. Don't mix ReactiveForms and TemplateForms
  2. Don't apply formGroup and formControlName to the same element
  3. For the logic of your toggleSelection, you need to iterate over the shoes selects, not over the toggle (that will be always one).
vague nimbus
#

It wasn't for lack of research. But everyone I followed by example went wrong

novel root
#

Setup correctly a form first, then we'll look into the select all functionality.

novel root
#

You didn't bind the formControl

#

And you probably want a FormArray

#

and there's no multiple directive for FormGroup

vague nimbus
#

the FormArray would go in the checkbox or in the mat-list?