Warm tip: This article is reproduced from stackoverflow.com, please click
angular angular-material angular7

Make material grid list sortable via drag and drop

发布于 2020-03-27 10:17:15

I have a material grid list <mat-grid-list> with 6 columns and X rows... It shows products of a web I'm developing. I'm trying to make this grid list sortable drag & drop. enter image description here

I've read many posts using cdkDropList, cdkDrag... But it is not working correctly. I've seen people doind it using just with div elements, but this is not what I want.

I'm having the same trouble as the next image. enter image description here

Can anyone help me?

Questioner
Esteban Chornet
Viewed
192
RikG93 2019-07-03 21:31

Recently Angular Material has introduced the possibility of drag and drop. At the link you can find more details.

Angular Material Drag and Drop

I Hope help you.