【发布时间】:2020-01-12 04:01:28
【问题描述】:
我将 angular material flat tree 用于 drag and drop。
我使用来自 stackblitz link 的示例实现了 drag and drop。
当我将父节点拖放到子节点时出现错误。
这是错误Cannot read property 'findIndex' of undefined
Instead of showing that error i want to disable the action of DND of parent to child.
到目前为止,这是我的 work。 提前致谢。
【问题讨论】:
-
我无法重现该问题。你能告诉我更多吗?
-
@JSmith,请尝试将父节点拖放到子节点,然后再尝试一次会出错。我更新了我的演示。另请查看我们的聊天室。提前致谢。
-
请添加详细的过程以重现错误
-
我看到你已经实现了我的方法我只是在显示中看到了一些错误并且不知道这是来自我的算法还是 DND 过程。目前我唯一的问题是
ERROR TypeError: "siblings is undefined" -
@zerocewl 将父级放入子级时,暂时不会显示错误。该错误将在下一次免打扰操作中显示。
标签: angular angular-material2 angular-dragdrop angular-tree-component