fixed um paginator

master
FlayInAHook 4 years ago
parent 679bbe94d5
commit d23ba6e297

@ -62,11 +62,11 @@
<mat-row *matRowDef="let row; columns: displayedColumns;"></mat-row>
</mat-table>
<mat-paginator #paginator
[length]="dataSource.filteredData.length"
[length]="dataSource ? 'dataSource.filteredData.length' : '10'"
[pageIndex]="0"
[pageSize]="10"
[pageSizeOptions]="[5, 10, 25, 100]"
*ngIf="isLoaded">
>
</mat-paginator>
</div>

@ -162,8 +162,13 @@ export class AdminDataPageComponent implements OnInit {
}
afterLoad(){
this.dataSource.paginator = this.paginator;
this.dataSource.sort = this.sort;
setTimeout(() => {
this.dataSource.paginator = this.paginator;
this.dataSource.sort = this.sort;
}, );
//this.refreshTable();
}
orderData(id: string, start?: "asc" | "desc") {

Loading…
Cancel
Save