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 11{
22 "name" : " react-sortable-tree" ,
3- "version" : " 0.1.4 " ,
3+ "version" : " 0.1.5 " ,
44 "description" : " Drag-and-drop sortable representation of hierarchical data" ,
55 "scripts" : {
66 "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 = ({
3232 buttons,
3333 className,
3434 style = { } ,
35+ startDrag : _startDrag ,
36+ endDrag : _endDrag ,
37+ ...otherProps ,
3538} ) => {
3639 let handle ;
3740 if ( typeof node . children === 'function' && node . expanded ) {
@@ -65,7 +68,10 @@ const NodeRendererDefault = ({
6568 const isDraggedDescendant = draggedNode && isDescendant ( draggedNode , node ) ;
6669
6770 return (
68- < div style = { { height : '100%' } } >
71+ < div
72+ style = { { height : '100%' } }
73+ { ...otherProps }
74+ >
6975 { toggleChildrenVisibility && node . children && node . children . length > 0 && (
7076 < div >
7177 < button
@@ -157,6 +163,8 @@ NodeRendererDefault.propTypes = {
157163 // Drag source
158164 connectDragPreview : PropTypes . func . isRequired ,
159165 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
160168 isDragging : PropTypes . bool . isRequired ,
161169 draggedNode : PropTypes . object ,
162170 // Drop target
You can’t perform that action at this time.
0 commit comments