react-virtualized-sticky-tree
Advanced tools
Comparing version 2.0.12 to 2.0.13
@@ -64,3 +64,5 @@ 'use strict'; | ||
var nodes = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : []; | ||
var context = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : { totalHeight: 0, parentIndex: undefined }; | ||
var firstChild = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false; | ||
var lastChild = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false; | ||
var context = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : { totalHeight: 0, parentIndex: undefined }; | ||
@@ -78,3 +80,5 @@ var index = nodes.length; | ||
height: height, | ||
index: index | ||
index: index, | ||
firstChild: firstChild, | ||
lastChild: lastChild | ||
}; | ||
@@ -97,3 +101,3 @@ | ||
var child = children[i]; | ||
this.flattenTree(child, props, nodes, context); | ||
this.flattenTree(child, props, nodes, i === 0, i === children.length, context); | ||
} | ||
@@ -502,3 +506,3 @@ } | ||
style: this.getChildContainerStyle(child, top) }, | ||
this.props.rowRenderer({ id: child.id, style: this.getClientNodeStyle(child) }), | ||
this.renderNode(child, this.getClientNodeStyle(child)), | ||
this.renderParentContainer(child, indexesToRender) | ||
@@ -564,6 +568,6 @@ ); | ||
style: _this2.getChildContainerStyle(child, top) }, | ||
_this2.props.rowRenderer({ id: child.id, style: _this2.getClientNodeStyle(child) }) | ||
_this2.renderNode(child, _this2.getClientNodeStyle(child)) | ||
)); | ||
} else { | ||
nodes.push(_this2.props.rowRenderer({ id: child.id, style: _this2.getClientLeafNodeStyle(child, top) })); | ||
nodes.push(_this2.renderNode(child, _this2.getClientLeafNodeStyle(child, top))); | ||
} | ||
@@ -581,3 +585,12 @@ } | ||
}() | ||
}, { | ||
key: 'renderNode', | ||
value: function () { | ||
function renderNode(nodeInfo, style) { | ||
return this.props.rowRenderer({ id: nodeInfo.id, nodeInfo: nodeInfo, style: style }); | ||
} | ||
return renderNode; | ||
}() | ||
/** | ||
@@ -584,0 +597,0 @@ * Determines the start and end number of the range to be rendered. |
@@ -64,3 +64,5 @@ 'use strict'; | ||
var nodes = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : []; | ||
var context = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : { totalHeight: 0, parentIndex: undefined }; | ||
var firstChild = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false; | ||
var lastChild = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false; | ||
var context = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : { totalHeight: 0, parentIndex: undefined }; | ||
@@ -78,3 +80,5 @@ var index = nodes.length; | ||
height: height, | ||
index: index | ||
index: index, | ||
firstChild: firstChild, | ||
lastChild: lastChild | ||
}; | ||
@@ -97,3 +101,3 @@ | ||
var child = children[i]; | ||
this.flattenTree(child, props, nodes, context); | ||
this.flattenTree(child, props, nodes, i === 0, i === children.length, context); | ||
} | ||
@@ -502,3 +506,3 @@ } | ||
style: this.getChildContainerStyle(child, top) }, | ||
this.props.rowRenderer({ id: child.id, style: this.getClientNodeStyle(child) }), | ||
this.renderNode(child, this.getClientNodeStyle(child)), | ||
this.renderParentContainer(child, indexesToRender) | ||
@@ -564,6 +568,6 @@ ); | ||
style: _this2.getChildContainerStyle(child, top) }, | ||
_this2.props.rowRenderer({ id: child.id, style: _this2.getClientNodeStyle(child) }) | ||
_this2.renderNode(child, _this2.getClientNodeStyle(child)) | ||
)); | ||
} else { | ||
nodes.push(_this2.props.rowRenderer({ id: child.id, style: _this2.getClientLeafNodeStyle(child, top) })); | ||
nodes.push(_this2.renderNode(child, _this2.getClientLeafNodeStyle(child, top))); | ||
} | ||
@@ -581,3 +585,12 @@ } | ||
}() | ||
}, { | ||
key: 'renderNode', | ||
value: function () { | ||
function renderNode(nodeInfo, style) { | ||
return this.props.rowRenderer({ id: nodeInfo.id, nodeInfo: nodeInfo, style: style }); | ||
} | ||
return renderNode; | ||
}() | ||
/** | ||
@@ -584,0 +597,0 @@ * Determines the start and end number of the range to be rendered. |
{ | ||
"name": "react-virtualized-sticky-tree", | ||
"description": "A React component for efficiently rendering tree like structures with support for position: sticky", | ||
"version": "2.0.12", | ||
"version": "2.0.13", | ||
"author": "Marc McIntyre <marchaos@gmail.com>", | ||
@@ -6,0 +6,0 @@ "license": "MIT", |
82976
1640