Fix issue with sorting
This commit is contained in:
parent
a7a7d6581a
commit
04340a5572
@ -25,8 +25,8 @@ import { finalize } from 'rxjs';
|
||||
styleUrl: './param-table.component.scss'
|
||||
})
|
||||
export class ParamTableComponent {
|
||||
@ViewChild(MatPaginator) paginator!: MatPaginator;
|
||||
@ViewChild(MatSort) sort!: MatSort;
|
||||
//@ViewChild(MatPaginator) paginator!: MatPaginator;
|
||||
//@ViewChild(MatSort) sort!: MatSort;
|
||||
|
||||
@Input() table_mode: TABLE_MODE = 'TABLE-RECORD';
|
||||
@Input() paramHeading: string = 'Table Records';
|
||||
@ -54,6 +54,17 @@ export class ParamTableComponent {
|
||||
private notificationService = inject(NotificationService);
|
||||
|
||||
dataSource = new MatTableDataSource<any>([]);
|
||||
|
||||
@ViewChild(MatPaginator, { static: false })
|
||||
set paginator(value: MatPaginator) {
|
||||
this.dataSource.paginator = value;
|
||||
}
|
||||
|
||||
@ViewChild(MatSort, { static: false })
|
||||
set sort(value: MatSort) {
|
||||
this.dataSource.sort = value;
|
||||
}
|
||||
|
||||
paramForm: FormGroup;
|
||||
|
||||
ngAfterViewInit() {
|
||||
@ -62,8 +73,8 @@ export class ParamTableComponent {
|
||||
this.dataSource.data = this.paramData;
|
||||
}
|
||||
|
||||
displayedColumns: string[] = ['ParamType', 'ParamDesc', 'paramvalue', 'addlparamvalue1', 'addlparamvalue2', 'addlparamvalue3',
|
||||
'addlparamvalue4', 'addlparamvalue5', 'actions'];
|
||||
displayedColumns: string[] = ['paramType', 'paramDesc', 'paramValue', 'addlParamValue1', 'addlParamValue2', 'addlParamValue3',
|
||||
'addlParamValue4', 'addlParamValue5', 'actions'];
|
||||
|
||||
formControls: any = {};
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user