Skip to content

Commit

Permalink
fix(cdk/table): revert breaking change of CdkTable constructor
Browse files Browse the repository at this point in the history
With Release 13.1.2 a breaking change was introduced in cdk/table.
If a consumer has a class which extends CdkTable, compilation breaks
due to the newly introduced required constructor parameter _ngZone.
See PR: #23885
  • Loading branch information
jeripeierSBB committed Jan 13, 2022
1 parent 52155ac commit 1eddf22
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/cdk/table/table.ts
Original file line number Diff line number Diff line change
Expand Up @@ -531,7 +531,7 @@ export class CdkTable<T> implements AfterContentChecked, CollectionViewer, OnDes
* @breaking-change 14.0.0
*/
@Optional()
protected readonly _ngZone: NgZone,
protected readonly _ngZone?: NgZone,
) {
if (!role) {
this._elementRef.nativeElement.setAttribute('role', 'table');
Expand Down
4 changes: 2 additions & 2 deletions tools/public_api_guard/cdk/table.md
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ export class CdkRowDef<T> extends BaseRowDef {
export class CdkTable<T> implements AfterContentChecked, CollectionViewer, OnDestroy, OnInit {
constructor(_differs: IterableDiffers, _changeDetectorRef: ChangeDetectorRef, _elementRef: ElementRef, role: string, _dir: Directionality, _document: any, _platform: Platform, _viewRepeater: _ViewRepeater<T, RenderRow<T>, RowContext<T>>, _coalescedStyleScheduler: _CoalescedStyleScheduler, _viewportRuler: ViewportRuler,
_stickyPositioningListener: StickyPositioningListener,
_ngZone: NgZone);
_ngZone?: NgZone | undefined);
addColumnDef(columnDef: CdkColumnDef): void;
addFooterRowDef(footerRowDef: CdkFooterRowDef): void;
addHeaderRowDef(headerRowDef: CdkHeaderRowDef): void;
Expand Down Expand Up @@ -334,7 +334,7 @@ export class CdkTable<T> implements AfterContentChecked, CollectionViewer, OnDes
// (undocumented)
ngOnInit(): void;
// @deprecated (undocumented)
protected readonly _ngZone: NgZone;
protected readonly _ngZone?: NgZone | undefined;
_noDataRow: CdkNoDataRow;
// (undocumented)
_noDataRowOutlet: NoDataRowOutlet;
Expand Down

0 comments on commit 1eddf22

Please sign in to comment.