react-sortable-tree icon indicating copy to clipboard operation
react-sortable-tree copied to clipboard

Wrong param name of the utils function

Open gangstaJS opened this issue 3 years ago • 0 comments

Why you named param - getNodeKey? definitely, it is not node key, it is INDEX of the path! I spent 2 hours for figured out why it does not work then I went to the source code and seen that it is the index. Should be getNodeKey: (item) => item.treeIndex, but not getNodeKey: (item) => item.node.key,

changeNodeAtPath({
    treeData,
    path,
    newNode,
    getNodeKey // get path index but not node key
})

gangstaJS avatar Apr 02 '21 15:04 gangstaJS