File tree Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " react-sortable-tree" ,
3
- "version" : " 0.1.4 " ,
3
+ "version" : " 0.1.5 " ,
4
4
"description" : " Drag-and-drop sortable representation of hierarchical data" ,
5
5
"scripts" : {
6
6
"build" : " npm run lint && npm run test && npm run build:demo && npm run build:umd" ,
Original file line number Diff line number Diff line change @@ -32,6 +32,9 @@ const NodeRendererDefault = ({
32
32
buttons,
33
33
className,
34
34
style = { } ,
35
+ startDrag : _startDrag ,
36
+ endDrag : _endDrag ,
37
+ ...otherProps ,
35
38
} ) => {
36
39
let handle ;
37
40
if ( typeof node . children === 'function' && node . expanded ) {
@@ -65,7 +68,10 @@ const NodeRendererDefault = ({
65
68
const isDraggedDescendant = draggedNode && isDescendant ( draggedNode , node ) ;
66
69
67
70
return (
68
- < div style = { { height : '100%' } } >
71
+ < div
72
+ style = { { height : '100%' } }
73
+ { ...otherProps }
74
+ >
69
75
{ toggleChildrenVisibility && node . children && node . children . length > 0 && (
70
76
< div >
71
77
< button
@@ -157,6 +163,8 @@ NodeRendererDefault.propTypes = {
157
163
// Drag source
158
164
connectDragPreview : PropTypes . func . isRequired ,
159
165
connectDragSource : PropTypes . func . isRequired ,
166
+ startDrag : PropTypes . func . isRequired , // Needed for drag-and-drop utils
167
+ endDrag : PropTypes . func . isRequired , // Needed for drag-and-drop utils
160
168
isDragging : PropTypes . bool . isRequired ,
161
169
draggedNode : PropTypes . object ,
162
170
// Drop target
You can’t perform that action at this time.
0 commit comments