netdjw
netdjw

Reputation: 6007

Is there any Angular event on mat-table when table rendering is finished?

I'm looking for an event what is fired when the Angular Material table (mat-table) rendering is finished.

I think it's need to fire on data source is changed, or the user changed the displayed columns or paginate event happend (but it's the same the data source is changed), or any other event happend what is occours a rerendering event.

I tried the generic ngOnChanges but it's not fireing when user change the displayed columns.

Is there any similar event what I can listen?

Upvotes: 9

Views: 6552

Answers (1)

Joe - Check out my books
Joe - Check out my books

Reputation: 16923

As of August 2021, you can use the contentChanged output property:

<mat-table #matTable
           [dataSource]="tableDatasource"
           (contentChanged)="hideLoader()" <--
>
...

Here's the related, merged PR.

Upvotes: 4

Related Questions