Skip to content

Commit c48742e

Browse files
jeripeierSBBandrewseguin
authored andcommitted
fix(cdk/table): revert breaking change of CdkTable constructor (#24202)
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 (cherry picked from commit 6c48d14)
1 parent a404580 commit c48742e

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/cdk/table/table.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -531,7 +531,7 @@ export class CdkTable<T> implements AfterContentChecked, CollectionViewer, OnDes
531531
* @breaking-change 14.0.0
532532
*/
533533
@Optional()
534-
protected readonly _ngZone: NgZone,
534+
protected readonly _ngZone?: NgZone,
535535
) {
536536
if (!role) {
537537
this._elementRef.nativeElement.setAttribute('role', 'table');

tools/public_api_guard/cdk/table.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,7 @@ export class CdkRowDef<T> extends BaseRowDef {
290290
export class CdkTable<T> implements AfterContentChecked, CollectionViewer, OnDestroy, OnInit {
291291
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,
292292
_stickyPositioningListener: StickyPositioningListener,
293-
_ngZone: NgZone);
293+
_ngZone?: NgZone | undefined);
294294
addColumnDef(columnDef: CdkColumnDef): void;
295295
addFooterRowDef(footerRowDef: CdkFooterRowDef): void;
296296
addHeaderRowDef(headerRowDef: CdkHeaderRowDef): void;
@@ -334,7 +334,7 @@ export class CdkTable<T> implements AfterContentChecked, CollectionViewer, OnDes
334334
// (undocumented)
335335
ngOnInit(): void;
336336
// @deprecated (undocumented)
337-
protected readonly _ngZone: NgZone;
337+
protected readonly _ngZone?: NgZone | undefined;
338338
_noDataRow: CdkNoDataRow;
339339
// (undocumented)
340340
_noDataRowOutlet: NoDataRowOutlet;

0 commit comments

Comments
 (0)