ng-matero / extensions

Angular Material Extensions Library.
https://ng-matero.github.io/extensions/
MIT License
398 stars 49 forks source link

[Feature Request]: Support cdkDrag on Data Grid #183

Closed leow1986 closed 1 year ago

leow1986 commented 1 year ago

Hi Zongbin,

I appreciate this project give such more convenience for build up angular projects. I am trying to create a table with checkbox that can be sorting/ordering by manual. The cdkDrag is a ready primitive can be used. I'd like to ask if it possible to add this feature? or are there a method that I can inject the cdkDrag to the table template? Thank you!

nzbin commented 1 year ago

Does this feature meet your needs? https://ng-matero.github.io/extensions/components/grid/overview#column-hiding-moving

leow1986 commented 1 year ago

No. I mean sort the rows. It should be more like this. https://stackoverflow.com/questions/53377450/reorder-mat-table-rows-with-angular-materials-drag-and-drop

leow1986 commented 1 year ago

Here is an other example and it also shows the same requirement like my case that user able to use drag and drop to change the order.

nzbin commented 1 year ago

Thanks for your advice, there has many limitations to wrap the mat-table, so I don't plan to support row sort in the short term.

leow1986 commented 1 year ago

I can understand. It might involve a bunch of things. Thanks for your review.

nzbin commented 1 year ago

I found that the mtx-grid has supported row sort. I created an example, please have a look. https://stackblitz.com/edit/angular-material-15-starter-x1xj4z-rsdmhq-3mpi42?file=src%2Fapp%2Fapp.component.html

leow1986 commented 1 year ago

It's clear and really helpful. Thank you!!