Skip to content

Commit

Permalink
fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
Diaan committed Sep 16, 2024
1 parent b6cc3e3 commit 4bbe387
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions packages/components/grid/src/view-model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -200,13 +200,12 @@ export class GridViewModel<T = any> {
if (col instanceof GridColumnGroup) {
return col;
}
const newGroup = new GridColumnGroup<T>();
if (!(col.parentElement instanceof GridColumnGroup)) {
const newGroup = new GridColumnGroup<T>();
// add the column this header group represents to the group in order to calculate the width correctly.
newGroup.columns = [col];
return newGroup;
newGroup.columns = [col as GridColumnGroup<T>];
}
return null;
return newGroup;
})
.filter(g => !!g);
const children = groups.reduce((acc: Array<Array<GridColumn<T>>>, cur) => {
Expand Down

0 comments on commit 4bbe387

Please sign in to comment.