frontend-collective / frontend-collective/react-sortable-tree
Wrong param name of the utils function
Open
- Dominant language
- JavaScript
- Stars
- 5k
- Forks
- 914
- PR merge metrics
- No merged PRs in 30d
Description
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,
```js
changeNodeAtPath({
treeData,
path,
newNode,
getNodeKey // get path index but not node key
})
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.