Error: Attempt to use a dehydrated detector: CMComponent_1 -> ngModelChange

40 Views Asked by At

I'm using checkbox on wijmo grid header, to select all below rows

<input type="checkbox" [(ngModel)]="_chkSelectAll" (change)="SelectAll()" id="chkSelectAll"/>

and using following ts code

 SelectAll(): void {     
        var chk = document.getElementById('chkSelectAll') as HTMLInputElement;
        var chkSelect = chk.checked;

        this._chkSelectAll = chkSelect;
    }

but getting error

Error: Attempt to use a dehydrated detector: CMComponent_1 -> ngModelChange

I also used setTimeout() in SelectAll() function but it doesn't work for me.

The same code is working on plunker

0

There are 0 best solutions below