admin管理员组文章数量:1357639
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 badges1 Answer
Reset to default -1https://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.
本文标签:
版权声明:本文标题:Angular Material drag and drop cdk, trigger function on dropping item on another item - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744078892a2587260.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论