File tree 4 files changed +15
-0
lines changed
examples/storybooks/__snapshots__
4 files changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -3376,13 +3376,15 @@ exports[`Storyshots Basics Themes 1`] = `
3376
3376
" width" : " 100%" ,
3377
3377
}
3378
3378
}
3379
+ treeId = " rst__7"
3379
3380
>
3380
3381
<div
3381
3382
style = {
3382
3383
Object {
3383
3384
" height" : " 100%" ,
3384
3385
}
3385
3386
}
3387
+ treeId = " rst__7"
3386
3388
>
3387
3389
<button
3388
3390
aria-label = " Collapse"
@@ -3456,13 +3458,15 @@ exports[`Storyshots Basics Themes 1`] = `
3456
3458
" width" : " 100%" ,
3457
3459
}
3458
3460
}
3461
+ treeId = " rst__7"
3459
3462
>
3460
3463
<div
3461
3464
style = {
3462
3465
Object {
3463
3466
" height" : " 100%" ,
3464
3467
}
3465
3468
}
3469
+ treeId = " rst__7"
3466
3470
>
3467
3471
<button
3468
3472
aria-label = " Collapse"
@@ -3544,13 +3548,15 @@ exports[`Storyshots Basics Themes 1`] = `
3544
3548
" width" : " 100%" ,
3545
3549
}
3546
3550
}
3551
+ treeId = " rst__7"
3547
3552
>
3548
3553
<div
3549
3554
style = {
3550
3555
Object {
3551
3556
" height" : " 100%" ,
3552
3557
}
3553
3558
}
3559
+ treeId = " rst__7"
3554
3560
>
3555
3561
<div
3556
3562
className = " rstcustom__rowWrapper"
@@ -3637,13 +3643,15 @@ exports[`Storyshots Basics Themes 1`] = `
3637
3643
" width" : " 100%" ,
3638
3644
}
3639
3645
}
3646
+ treeId = " rst__7"
3640
3647
>
3641
3648
<div
3642
3649
style = {
3643
3650
Object {
3644
3651
" height" : " 100%" ,
3645
3652
}
3646
3653
}
3654
+ treeId = " rst__7"
3647
3655
>
3648
3656
<div
3649
3657
className = " rstcustom__rowWrapper"
@@ -3706,13 +3714,15 @@ exports[`Storyshots Basics Themes 1`] = `
3706
3714
" width" : " 100%" ,
3707
3715
}
3708
3716
}
3717
+ treeId = " rst__7"
3709
3718
>
3710
3719
<div
3711
3720
style = {
3712
3721
Object {
3713
3722
" height" : " 100%" ,
3714
3723
}
3715
3724
}
3725
+ treeId = " rst__7"
3716
3726
>
3717
3727
<div
3718
3728
className = " rstcustom__rowWrapper"
Original file line number Diff line number Diff line change @@ -38,6 +38,7 @@ class NodeRendererDefault extends Component {
38
38
className,
39
39
style,
40
40
didDrop,
41
+ treeId,
41
42
isOver, // Not needed, but preserved for other renderers
42
43
parentNode, // Needed for dndManager
43
44
...otherProps
@@ -209,6 +210,7 @@ NodeRendererDefault.propTypes = {
209
210
PropTypes . oneOfType ( [ PropTypes . string , PropTypes . number ] )
210
211
) . isRequired ,
211
212
treeIndex : PropTypes . number . isRequired ,
213
+ treeId : PropTypes . string . isRequired ,
212
214
isSearchMatch : PropTypes . bool ,
213
215
isSearchFocus : PropTypes . bool ,
214
216
canDrag : PropTypes . bool ,
Original file line number Diff line number Diff line change @@ -480,6 +480,7 @@ class ReactSortableTree extends Component {
480
480
scaffoldBlockPxWidth,
481
481
node,
482
482
path,
483
+ treeId : this . treeId ,
483
484
} ;
484
485
485
486
return (
Original file line number Diff line number Diff line change @@ -17,6 +17,7 @@ class TreeNode extends Component {
17
17
draggedNode,
18
18
canDrop,
19
19
treeIndex,
20
+ treeId, // Delete from otherProps
20
21
getPrevRow, // Delete from otherProps
21
22
node, // Delete from otherProps
22
23
path, // Delete from otherProps
@@ -150,6 +151,7 @@ TreeNode.defaultProps = {
150
151
151
152
TreeNode . propTypes = {
152
153
treeIndex : PropTypes . number . isRequired ,
154
+ treeId : PropTypes . string . isRequired ,
153
155
swapFrom : PropTypes . number ,
154
156
swapDepth : PropTypes . number ,
155
157
swapLength : PropTypes . number ,
You can’t perform that action at this time.
0 commit comments