Add Layer by hand, pagination fix
This commit is contained in:
@@ -45,8 +45,6 @@
|
||||
<mat-header-row *matHeaderRowDef="displayedColumns"></mat-header-row>
|
||||
<mat-row *matRowDef="let item; columns: displayedColumns;"></mat-row>
|
||||
</mat-table>
|
||||
<mat-paginator #paginator [pageSize]="50" [pageSizeOptions]="[5, 10, 20]">
|
||||
</mat-paginator>
|
||||
</mat-card-content>
|
||||
</mat-card>
|
||||
</form>
|
||||
|
||||
@@ -24,7 +24,6 @@ export class LayerDetailComponent implements OnInit {
|
||||
displayedColumns = ['code', 'value'];
|
||||
dataSource!: MatTableDataSource<Record>;
|
||||
|
||||
@ViewChild(MatPaginator) paginator!: MatPaginator;
|
||||
@ViewChild(MatSort) sort!: MatSort;
|
||||
|
||||
constructor(
|
||||
@@ -41,7 +40,6 @@ export class LayerDetailComponent implements OnInit {
|
||||
this.form = Layer.getForm(this.fb$);
|
||||
this.document = await this.load();
|
||||
this.dataSource = new MatTableDataSource<Record>(this.document.records);
|
||||
this.dataSource.paginator = this.paginator;
|
||||
this.dataSource.sort = this.sort;
|
||||
this.document.fillForm(this.form);
|
||||
this.form.disable();
|
||||
|
||||
Reference in New Issue
Block a user