Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why Angular ReactiveForms FormArray throws error "TypeError: Cannot read property 'updateOn' of null"

Hello All I have a Formarray which which has set of Roles. During Edit it dynamically removes & adds roles in that form array till here all works fine, but when i submit the form it thorws error & the page gets refresh.

Error : TypeError: Cannot read property 'updateOn' of null

Also I am attaching the screen shot belowenter image description here

like image 873
Jignesh Mistry Avatar asked Jul 11 '19 04:07

Jignesh Mistry


1 Answers

it is worked for Me

Make sure you have put <button type="button" ></button> instead of <input type="submit" />

<button [ngClass]="(this.editMemberForm.invalid?'a1':'')" type="button" class="btn btn-success" (click)="saveData()">Save</button>
like image 128
Sandeep Patel Avatar answered Nov 05 '22 13:11

Sandeep Patel