PascalHonegger / ng-datatable

DataTable - Simple table component with sorting and pagination for the latest Angular

Home Page:https://www.npmjs.com/package/@pascalhonegger/ng-datatable

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

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 ? :)