Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(datagrid): prevent injection error with @angular/cdk@19.1.0 #1673

Merged
merged 1 commit into from
Jan 17, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading