1

I need to implement the Lazy rendering to the mat-expansion-panel, not to the matExpansionPanelContent I have thousands of record and I am displaying it in the mat-expansion-panel, I need to load the mat-expansion-panel by using Lazy rendering first I need to load some set of records like 15 when I scroll down it should render next set of records.

the problem is it's taking more than 1 min to load 1000's od records

i have a ngfor which can have more then 1000's of records like.

<mat-accordion>
<mat-expansion-panel *ngFor="something">
  <mat-expansion-panel-header>
    This is the expansion title
  </mat-expansion-panel-header>

  <ng-template matExpansionPanelContent>
    Some deferred content
  </ng-template>
</mat-expansion-panel>
</mat-accordion>

the actual result should load a set of mat-expansion-panel and when scrolling it should render the next set of mat-expansion-panel

  • Use the Virtual Scroll feature from the CDK: https://material.angular.io/cdk/scrolling/overview – Tim Sep 18 '20 at 08:05

0 Answers0