shlomiassaf / ngrid

A angular grid for the enterprise

Home Page:https://shlomiassaf.github.io/ngrid

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Build fails if used with latest @angular/cdk

skrtheboss opened this issue · comments

What is the expected behavior?

Build should pass.

What is the current behavior?

Build fails with the following error:

Error: node_modules/@pebula/ngrid/drag/lib/column-resize/column-resize.component.d.ts:37:135 - error TS2344: Type 'PblNgridDragResizeComponent' does not satisfy the constraint '{ isDragging(): boolean; }'.
Property 'isDragging' is missing in type 'PblNgridDragResizeComponent' but required in type '{ isDragging(): boolean; }'.

37 constructor(element: ElementRef, _ngZone: NgZone, _viewportRuler: ViewportRuler, _dragDropRegistry: DragDropRegistry<PblNgridDragResizeComponent, any>, _config: DragDropConfig);
~~~~~~~~~~~~~~~~~~~~~~~~~~~

node_modules/@angular/cdk/drag-drop/drag-drop-registry.d.ts:17:5
17 isDragging(): boolean;
~~~~~~~~~~~~~~~~~~~~~~
'isDragging' is declared here.

Which versions of Angular, CDK, Material, NGrid, OS, TypeScript, browsers are affected?

Angular: 11.0.9
Angular CDK: 11.0.4
Angular Material: 11.0.4
NGrid: 3.0.0
Typescript: 4.0.5

Have you found a combination that works with NGrid 3 and Angular 11? I'm currently struggling getting row reordering to work, because with NGrid 2 there seems to be an odd bug that rows don't snap into place as seen here: Stackblitz NGrid Starter v2

@berkyl, Downgrade to "@angular/cdk": "11.0.3", "@angular/material": "11.0.3"

Cdk probably changed their api again.

I'll issue a fix but you can workaround it with basic type augmentation on the interface

@berkyl

Have you found a combination that works with NGrid 3 and Angular 11? I'm currently struggling getting row reordering to work, because with NGrid 2 there seems to be an odd bug that rows don't snap into place as seen here: Stackblitz NGrid Starter v2

Go to the code there, in app.component.html and see the comment.
It's not enabled.

I've removed the column that allows reordering.

If you want to add it, just add the directive rowReorder to pbl-ngrid