mat-filtering/mat-sort not work correctly when use ngif in mat-table parent

前端 未结 5 1838
甜味超标
甜味超标 2021-02-08 13:02

Note that paging/sort not work correctly. Paging does not show the number of elements it is showing and sorting does not work, but if you delete the line in the html file

5条回答
  •  慢半拍i
    慢半拍i (楼主)
    2021-02-08 13:09

    I have faced issue in hiding mat-paginator using *ngIf so I fixed it using below workaround. Define the below style in global.scss and apply the this style conditionally in mat-paginator

    .hide-paginator {
      display: none !important;
    }
    
    
    
      
    

提交回复
热议问题