angular / components

Component infrastructure and Material Design components for Angular
https://material.angular.io
MIT License
24.39k stars 6.76k forks source link

CdkDrag with ng-content no drag directives and mat-table is pain #30035

Closed boendermaker closed 3 days ago

boendermaker commented 1 week ago

I'm working on a reusable mat-table component with ng-content projection and with dragsortable rows and columns, column resize.

It seems that cdkDrag directives doesn't work with ng-content projection, so i tried to use only the dragdrop service from cdk which seems to work but with usage of detectChanges() and i have to re-add all draggables to their droplists on each dropevent for the columns.

When adding additional rows / data to the table on runtime, the newly added rows doesn't get recognized and can't be dragsorted.

Am i missing something? Seems there isn't that much example or even documentation for such a case (See my github kitchensink for code)

crisbeto commented 3 days ago

Please keep GitHub issues for bug reports / feature requests. Better avenues for troubleshooting / questions are stack overflow, gitter, mailing list, etc.