Skip to content

Commit

Permalink
fixup! feat: use proper type for row related properties
Browse files Browse the repository at this point in the history
  • Loading branch information
spike-rabbit committed Mar 27, 2024
1 parent 561d17c commit f829f95
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ export type TreeStatus = 'collapsed' | 'expanded' | 'loading' | 'disabled';
</ng-template>
`
})
export class DataTableBodyCellComponent<TRow extends {level?: number}> implements DoCheck, OnDestroy {
export class DataTableBodyCellComponent<TRow extends {level?: number} = any> implements DoCheck, OnDestroy {
@Input() displayCheck: (row: RowOrGroup<TRow>, column?: TableColumn, value?: any) => boolean;

_disable$: BehaviorSubject<boolean>;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ import { RowOrGroup } from "../../types/group.type";
class: 'datatable-row-wrapper'
}
})
export class DataTableRowWrapperComponent<TRow> implements DoCheck, OnInit {
export class DataTableRowWrapperComponent<TRow = any> implements DoCheck, OnInit {
@Input() innerWidth: number;
@Input() rowDetail: any;
@Input() groupHeader: any;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ import { RowOrGroup } from "../../types/group.type";
</div>
`
})
export class DataTableBodyRowComponent<TRow> implements DoCheck {
export class DataTableBodyRowComponent<TRow = any> implements DoCheck {
@Input() set columns(val: any[]) {
this._columns = val;
this.recalculateColumns(val);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export interface Model<TRow> {
template: ` <ng-content></ng-content> `,
changeDetection: ChangeDetectionStrategy.OnPush
})
export class DataTableSelectionComponent<TRow> {
export class DataTableSelectionComponent<TRow = any> {
@Input() rows: TRow[];
@Input() selected: TRow[];
@Input() selectEnabled: boolean;
Expand Down

0 comments on commit f829f95

Please sign in to comment.