react-sortable-tree-theme-full-node-drag icon indicating copy to clipboard operation
react-sortable-tree-theme-full-node-drag copied to clipboard

The prop listIndex is marked as required in CustomThemeNodeContentRenderer

Open svenkle opened this issue 8 years ago • 2 comments

When I use the provided examples in combination with this theme I receive the errors in the console (see screenshot). The controls appear to work correctly although I'm not 100% sure there isn't an unforeseen issue.

image

In any case, adding listIndex and lowerSiblingCounts to the declaration appears to have resolved the errors but I'm still raising this as an issue to allow others to find a potential solution and also validation that I haven't unknowingly broken internal functionality.

<SortableTree
    // Removed other elements for clarity
    listIndex: 0,
    lowerSiblingCounts: []
/>

svenkle avatar Dec 21 '17 12:12 svenkle

@svenkle I think that the syntax might be a little off on the SortableTree part, for anyone else that might be running into this problem.

<SortableTree
  generateNodeProps = {() => ({
    listIndex: 0,
    lowerSiblingCounts: []
  })}
/>

jcalebj avatar Jan 30 '18 18:01 jcalebj

What are these property used for and what do we configure it to. I'm guessing listIndex is the same as treeIndex but do these properties need to be set properly?

darewreck54 avatar Jun 17 '19 06:06 darewreck54