Skip to content

Commit

Permalink
refactor: fix pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
spike-rabbit committed May 2, 2024
1 parent a30cdce commit 52a3a2a
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ export class DataTableBodyCellComponent<TRow extends {level?: number} = any> imp
isSelected: this.isSelected,
rowIndex: this.rowIndex,
treeStatus: this.treeStatus,
disable$: this.disable$.asObservable(),
disable$: this.disable$,
onTreeAction: () => this.onTreeAction()
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,20 +98,22 @@ export class DataTableRowWrapperComponent<TRow = any> implements DoCheck, OnInit
rowIndex: this.rowIndex
};

this.rowContext = {
row: this.row,
expanded: this.expanded,
rowIndex: this.rowIndex,
disableRow$: this.disable$
};

this.rowDiffer = differs.find({}).create();
}

ngOnInit(): void {
if (this.disableCheck) {
const isRowDisabled = this.disableCheck(this.row);
this.disable$ = new BehaviorSubject(isRowDisabled);
this.rowContext.disableRow$ = this.disable$;
}
this.rowContext = {
row: this.row,
expanded: this.expanded,
rowIndex: this.rowIndex,
disableRow$: this.disable$.asObservable()
};
}

ngDoCheck(): void {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ export interface RowDetailContext<TRow> {
row: RowOrGroup<TRow>;
expanded: boolean;
rowIndex: number;
disableRow$: Observable<boolean>
disableRow$?: Observable<boolean>
}

0 comments on commit 52a3a2a

Please sign in to comment.