I have an angular material table in a reactive form, and I need it to show a number of inputs for every row. I can't know the number of rows in advance. Thus, I use FormArray
and populate it with FormGroup
which in turn contains FormControl's.
Here's the StackBlitz demo.
If you run it you'll see the error:
Error: control.setValidators is not a function
It's caused by the filter input which is not part of FormArray
. If I comment it out, the error disappears. But what is the problem with a simple FormControl here?
Can anyone please explain how to fix it? Is this a bug?