最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

Angular Material drag and drop cdk, trigger function on dropping item on another item - Stack Overflow

programmeradmin0浏览0评论

I have a reuseable "folder-component", I need to be able to drag that folder-component on another one and trigger a function. Is it possible with material drag & drop cdk? because so far all I can see is moving items between lists.

I have a reuseable "folder-component", I need to be able to drag that folder-component on another one and trigger a function. Is it possible with material drag & drop cdk? because so far all I can see is moving items between lists.

Share Improve this question asked Mar 27 at 16:45 Mohamed SalahMohamed Salah 2981 silver badge8 bronze badges
Add a comment  | 

1 Answer 1

Reset to default -1

https://v7.material.angular.io/cdk/drag-drop/api#CdkDragDrop

Using the CdkDragDrop event, you would be able to identify the container dropped and the container which it was dropped upon.

With this information, you would be able to carry out whichever function you wish, should the re-order occur, you can revert the changes in the list.

与本文相关的文章

发布评论

评论列表(0)

  1. 暂无评论