getter functions for custom objects
luchobarreto opened this issue · 0 comments
luchobarreto commented
New Feature
- What's your use case? I'm working on a company app that requires this package, I have the data to display already converted to a tree structure, but I can't change the variable names of the treeData because I'm using another similar package for other things.
- What interface do you have in mind? New methods: getTitle, getChildren, getId, getParentId, etc. Just getter methods to use custom objects.
Example:
<SortableTree treeData={customArray} getChildren={ ({ nodes }) => nodes } getParentId={ ({ parentId }) => parentId } ... />