admin管理员组文章数量:1334825
I work with primeng (v.17.18). I want to use their drag&drop system. I have no problem using it, or even Tree.
However, I'd like to use a mix of the two.
I have a list of items on one side that I want to drop into a tree.
Something like :
<div class="container">
<!-- Source -->
<div class="list-container">
<h3>Source</h3>
<ul>
<li
*ngFor="let item of sourceList"
pDraggable="treeItems"
[dragData]="item"
[ngStyle]="{ cursor: 'move' }"
>
{{ item }}
</li>
</ul>
</div>
<!-- P-Tree -->
<div class="tree-container">
<h3>Tree</h3>
<p-tree
[value]="treeNodes"
[draggableNodes]="false"
droppableNodes="true"
pDroppable="treeItems"
(onNodeDrop)="onNodeDrop($event)"
></p-tree>
</div>
</div>
But cane doesn't work. And I don't even know if I can make it work...
One solution would be to override the CSS style of the and have a “flat” tree for Drag and Drop into a basic tree.
Thanks for your advice
本文标签: angularUse basic DragampDrop With A tree in PrimeNGStack Overflow
版权声明:本文标题:angular - Use basic Drag&Drop With A tree in PrimeNG - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1742369349a2461922.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论