Skip to content

Commit

Permalink
fix(datagrid): prevent injection error with @angular/cdk@19.1.0 (#1673
Browse files Browse the repository at this point in the history
)
  • Loading branch information
kevinbuhmann authored Jan 17, 2025
1 parent dc10725 commit 058fbac
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
4 changes: 2 additions & 2 deletions projects/angular/clarity.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -5505,7 +5505,7 @@ export class ÇlrDatagridSelectionCellDirective {

// @public (undocumented)
export class ÇlrDatagridVirtualScrollDirective<T> implements AfterViewInit, DoCheck, OnDestroy {
constructor(changeDetectorRef: ChangeDetectorRef, iterableDiffers: IterableDiffers, items: Items<T>, ngZone: NgZone, templateRef: TemplateRef<CdkVirtualForOfContext<T>>, viewContainerRef: ViewContainerRef, directionality: Directionality, scrollDispatcher: ScrollDispatcher, viewportRuler: ViewportRuler, datagrid: ClrDatagrid, columnsService: ColumnsService, injector: EnvironmentInjector);
constructor(changeDetectorRef: ChangeDetectorRef, iterableDiffers: IterableDiffers, items: Items<T>, ngZone: NgZone, renderer2: Renderer2, templateRef: TemplateRef<CdkVirtualForOfContext<T>>, viewContainerRef: ViewContainerRef, directionality: Directionality, scrollDispatcher: ScrollDispatcher, viewportRuler: ViewportRuler, datagrid: ClrDatagrid, columnsService: ColumnsService, injector: EnvironmentInjector);
// Warning: (ae-forgotten-export) The symbol "CdkVirtualForInputs" needs to be exported by the entry point index.d.ts
//
// (undocumented)
Expand Down Expand Up @@ -5542,7 +5542,7 @@ export class ÇlrDatagridVirtualScrollDirective<T> implements AfterViewInit, DoC
// (undocumented)
static ɵdir: i0.ɵɵDirectiveDeclaration<ÇlrDatagridVirtualScrollDirective<any>, "[ClrVirtualScroll]", never, { "cdkVirtualForOf": "clrVirtualRowsOf"; "cdkVirtualForTrackBy": "clrVirtualRowsTrackBy"; "cdkVirtualForTemplate": "clrVirtualRowsTemplate"; "cdkVirtualForTemplateCacheSize": "clrVirtualRowsTemplateCacheSize"; "itemSize": "clrVirtualRowsItemSize"; "minBufferPx": "clrVirtualRowsMinBufferPx"; "maxBufferPx": "clrVirtualRowsMaxBufferPx"; }, { "renderedRangeChange": "renderedRangeChange"; }, never, never, false, never>;
// (undocumented)
static ɵfac: i0.ɵɵFactoryDeclaration<ÇlrDatagridVirtualScrollDirective<any>, [null, null, { skipSelf: true; }, null, null, null, null, null, null, null, null, null]>;
static ɵfac: i0.ɵɵFactoryDeclaration<ÇlrDatagridVirtualScrollDirective<any>, [null, null, { skipSelf: true; }, null, null, null, null, null, null, null, null, null, null]>;
}

// @public (undocumented)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ import {
NgZone,
OnDestroy,
Output,
Renderer2,
SkipSelf,
TemplateRef,
ViewContainerRef,
Expand Down Expand Up @@ -99,6 +100,7 @@ export class ClrDatagridVirtualScrollDirective<T> implements AfterViewInit, DoCh
private iterableDiffers: IterableDiffers,
@SkipSelf() private items: Items<T>,
private readonly ngZone: NgZone,
private readonly renderer2: Renderer2,
private readonly templateRef: TemplateRef<CdkVirtualForOfContext<T>>,
private readonly viewContainerRef: ViewContainerRef,
private readonly directionality: Directionality,
Expand Down Expand Up @@ -198,6 +200,7 @@ export class ClrDatagridVirtualScrollDirective<T> implements AfterViewInit, DoCh
this.virtualScrollViewport = this.createVirtualScrollViewportForDatagrid(
this.changeDetectorRef,
this.ngZone,
this.renderer2,
this.directionality,
this.scrollDispatcher,
this.viewportRuler,
Expand Down Expand Up @@ -296,6 +299,7 @@ export class ClrDatagridVirtualScrollDirective<T> implements AfterViewInit, DoCh
private createVirtualScrollViewportForDatagrid(
changeDetectorRef: ChangeDetectorRef,
ngZone: NgZone,
renderer2: Renderer2,
directionality: Directionality,
scrollDispatcher: ScrollDispatcher,
viewportRuler: ViewportRuler,
Expand All @@ -319,6 +323,7 @@ export class ClrDatagridVirtualScrollDirective<T> implements AfterViewInit, DoCh
datagridDivElementRef,
changeDetectorRef,
ngZone,
renderer2,
virtualScrollStrategy,
directionality,
scrollDispatcher,
Expand Down Expand Up @@ -351,6 +356,7 @@ function createCdkVirtualScrollViewport(
datagridDivElementRef: ElementRef<HTMLElement>,
changeDetectorRef: ChangeDetectorRef,
ngZone: NgZone,
renderer2: Renderer2,
virtualScrollStrategy: VirtualScrollStrategy,
directionality: Directionality,
scrollDispatcher: ScrollDispatcher,
Expand All @@ -375,6 +381,7 @@ function createCdkVirtualScrollViewport(
{ provide: ElementRef, useValue: datagridDivElementRef },
{ provide: ChangeDetectorRef, useValue: changeDetectorRef },
{ provide: NgZone, useValue: ngZone },
{ provide: Renderer2, useValue: renderer2 },
{ provide: VIRTUAL_SCROLL_STRATEGY, useValue: virtualScrollStrategy },
{ provide: Directionality, useValue: directionality },
{ provide: ScrollDispatcher, useValue: scrollDispatcher },
Expand Down

0 comments on commit 058fbac

Please sign in to comment.