Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

【Bug】SortableTree addNode 方法未实现带 index 情况 #54

Open
rdmclin2 opened this issue Aug 3, 2023 · 3 comments
Open

【Bug】SortableTree addNode 方法未实现带 index 情况 #54

rdmclin2 opened this issue Aug 3, 2023 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@rdmclin2
Copy link
Member

rdmclin2 commented Aug 3, 2023

详见代码:

image

@rdmclin2
Copy link
Member Author

rdmclin2 commented Aug 3, 2023

@arvinxx 看下树形结构添加Node 是不是需要指定 parentId 的,目前看实现是直接加到树的末尾。比如我想在某个树节点下增加一个节点就不太好实现。

@rdmclin2 rdmclin2 added the bug Something isn't working label Aug 3, 2023
@arvinxx
Copy link
Collaborator

arvinxx commented Aug 3, 2023

@arvinxx 看下树形结构添加Node 是不是需要指定 parentId 的,目前看实现是直接加到树的末尾。比如我想在某个树节点下增加一个节点就不太好实现。

那看来第二个参数要改下?变成一个 object

interface Params {
  index?:number;
  parentId?:string;
}

@Rarchers
Copy link

Rarchers commented Jul 9, 2024

这个问题在1.2.1版本是还没有修复么,我有什么临时的解决方案能够绕过这个限制在任意节点添加子节点么

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants