ng 17 @for control flow brake tests
sysmat opened this issue · comments
- "@pascalhonegger/ng-datatable": "16.0.2",
- "@angular/core": "17.0.2",
- error in tets:
Error: NG0100: ExpressionChangedAfterItHasBeenCheckedError: Expression has changed after it was checked
<table class="table table-striped table-sm"
[mfData]="domains | domainListFilter: filterDomain"
#mf="mfDataTable"
[mfRowsOnPage]="25"
aria-describedby="domains">
....
<tr *ngFor="let domain of mf.data; trackBy: trackByFn"> <!-- works -->
@for (domain of mf.data; track trackByFn) { <!-- NOT works -->
The same error is also in browser when running dev server
- reproduction https://stackblitz.com/edit/stackblitz-starters-jx5weg?file=demo%2Fsrc%2Fapp%2Fapp.component.ts
- in terminal
cd demo
- in terminal
pnpm install
- in terminal
pnpm run start
- in browser open dev console and see the error
Same error when converting *ngFor
to @for
block control flow for looping over ng-datatable data in dev server mode.
Thanks for raising this issue, I've been sick the last few days but will hopefully get around to upgrading and fixing ng-datatable within this week 🙂
I upgraded all the dependencies and could not reproduce the issue, can you verify it's also fixed in your environment using v17.0.0 @sysmat ? :)