Skip to content

Commit f829f95

Browse files
committed
fixup! feat: use proper type for row related properties
1 parent 561d17c commit f829f95

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

projects/ngx-datatable/src/lib/components/body/body-cell.component.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ export type TreeStatus = 'collapsed' | 'expanded' | 'loading' | 'disabled';
7272
</ng-template>
7373
`
7474
})
75-
export class DataTableBodyCellComponent<TRow extends {level?: number}> implements DoCheck, OnDestroy {
75+
export class DataTableBodyCellComponent<TRow extends {level?: number} = any> implements DoCheck, OnDestroy {
7676
@Input() displayCheck: (row: RowOrGroup<TRow>, column?: TableColumn, value?: any) => boolean;
7777

7878
_disable$: BehaviorSubject<boolean>;

projects/ngx-datatable/src/lib/components/body/body-row-wrapper.component.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ import { RowOrGroup } from "../../types/group.type";
4545
class: 'datatable-row-wrapper'
4646
}
4747
})
48-
export class DataTableRowWrapperComponent<TRow> implements DoCheck, OnInit {
48+
export class DataTableRowWrapperComponent<TRow = any> implements DoCheck, OnInit {
4949
@Input() innerWidth: number;
5050
@Input() rowDetail: any;
5151
@Input() groupHeader: any;

projects/ngx-datatable/src/lib/components/body/body-row.component.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ import { RowOrGroup } from "../../types/group.type";
5555
</div>
5656
`
5757
})
58-
export class DataTableBodyRowComponent<TRow> implements DoCheck {
58+
export class DataTableBodyRowComponent<TRow = any> implements DoCheck {
5959
@Input() set columns(val: any[]) {
6060
this._columns = val;
6161
this.recalculateColumns(val);

projects/ngx-datatable/src/lib/components/body/selection.component.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ export interface Model<TRow> {
1717
template: ` <ng-content></ng-content> `,
1818
changeDetection: ChangeDetectionStrategy.OnPush
1919
})
20-
export class DataTableSelectionComponent<TRow> {
20+
export class DataTableSelectionComponent<TRow = any> {
2121
@Input() rows: TRow[];
2222
@Input() selected: TRow[];
2323
@Input() selectEnabled: boolean;

0 commit comments

Comments
 (0)