File tree 1 file changed +17
-2
lines changed
1 file changed +17
-2
lines changed Original file line number Diff line number Diff line change @@ -619,7 +619,17 @@ class ReactSortableTree extends Component {
619
619
estimatedRowSize = {
620
620
typeof rowHeight !== 'function' ? rowHeight : undefined
621
621
}
622
- rowHeight = { rowHeight }
622
+ rowHeight = {
623
+ typeof rowHeight !== 'function'
624
+ ? rowHeight
625
+ : ( { index } ) =>
626
+ rowHeight ( {
627
+ index,
628
+ treeIndex : index ,
629
+ node : rows [ index ] . node ,
630
+ path : rows [ index ] . path ,
631
+ } )
632
+ }
623
633
rowRenderer = { ( { index, style : rowStyle } ) =>
624
634
this . renderRow ( rows [ index ] , {
625
635
listIndex : index ,
@@ -645,7 +655,12 @@ class ReactSortableTree extends Component {
645
655
height :
646
656
typeof rowHeight !== 'function'
647
657
? rowHeight
648
- : rowHeight ( { index } ) ,
658
+ : rowHeight ( {
659
+ index,
660
+ treeIndex : index ,
661
+ node : row . node ,
662
+ path : row . path ,
663
+ } ) ,
649
664
} ,
650
665
getPrevRow : ( ) => rows [ index - 1 ] || null ,
651
666
matchKeys,
You can’t perform that action at this time.
0 commit comments