Skip to content

Commit

Permalink
Revert "fix: do not emit state column in columnConfigsChange (#2403)"
Browse files Browse the repository at this point in the history
This reverts commit 1e8d426.
  • Loading branch information
arjunlalb committed Sep 18, 2023
1 parent 1e8d426 commit b7b1ef5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
10 changes: 6 additions & 4 deletions projects/components/src/table/table.component.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -464,10 +464,12 @@ describe('Table component', () => {

// Hiding a column
spectator.component.onHideColumn(columns[0]);
expect(mockColumnConfigsChange).toHaveBeenLastCalledWith([
expect.objectContaining({ ...columns[0], visible: false }),
expect.objectContaining({ ...columns[1] })
]);
expect(mockColumnConfigsChange).toHaveBeenLastCalledWith(
expect.arrayContaining([
expect.objectContaining({ ...columns[0], visible: false }),
expect.objectContaining({ ...columns[1] })
])
);
flush();
}));

Expand Down
2 changes: 1 addition & 1 deletion projects/components/src/table/table.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -915,7 +915,7 @@ export class TableComponent

private propagateUpdatedColumns(updatedColumns: TableColumnConfigExtended[]): void {
this.columnConfigsSubject.next(updatedColumns);
this.columnConfigsChange.next(updatedColumns.filter(column => !this.isStateColumn(column)));
this.columnConfigsChange.next(updatedColumns);
}

private buildColumnConfigExtendeds(columnConfigs: TableColumnConfig[]): TableColumnConfigExtended[] {
Expand Down

0 comments on commit b7b1ef5

Please sign in to comment.