react-virtualized-sticky-tree
Advanced tools
Comparing version 2.0.14 to 2.0.15
@@ -64,5 +64,6 @@ 'use strict'; | ||
var nodes = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : []; | ||
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 }; | ||
var isFirstChild = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false; | ||
var isLastChild = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false; | ||
var parentIndex = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : undefined; | ||
var context = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : { totalHeight: 0 }; | ||
@@ -78,7 +79,8 @@ var index = nodes.length; | ||
top: context.totalHeight, | ||
parentIndex: context.parentIndex, | ||
parentIndex: parentIndex, | ||
parentInfo: nodes[parentIndex], | ||
height: height, | ||
index: index, | ||
firstChild: firstChild, | ||
lastChild: lastChild | ||
isFirstChild: isFirstChild, | ||
isLastChild: isLastChild | ||
}; | ||
@@ -88,4 +90,4 @@ | ||
if (context.parentIndex !== undefined) { | ||
nodes[context.parentIndex].children.push(index); | ||
if (parentIndex !== undefined) { | ||
nodes[parentIndex].children.push(index); | ||
} | ||
@@ -100,5 +102,4 @@ | ||
// Need to reset parentIndex here as we are recursive. | ||
context.parentIndex = index; | ||
var child = children[i]; | ||
this.flattenTree(child, props, nodes, i === 0, i === children.length - 1, context); | ||
this.flattenTree(child, props, nodes, i === 0, i === children.length - 1, index, context); | ||
} | ||
@@ -803,3 +804,3 @@ } | ||
* <pre> | ||
* rowRenderer({ id, style }) | ||
* rowRenderer({ id, style, nodeInfo }) | ||
* </pre> | ||
@@ -806,0 +807,0 @@ * |
@@ -64,5 +64,6 @@ 'use strict'; | ||
var nodes = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : []; | ||
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 }; | ||
var isFirstChild = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false; | ||
var isLastChild = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false; | ||
var parentIndex = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : undefined; | ||
var context = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : { totalHeight: 0 }; | ||
@@ -78,7 +79,8 @@ var index = nodes.length; | ||
top: context.totalHeight, | ||
parentIndex: context.parentIndex, | ||
parentIndex: parentIndex, | ||
parentInfo: nodes[parentIndex], | ||
height: height, | ||
index: index, | ||
firstChild: firstChild, | ||
lastChild: lastChild | ||
isFirstChild: isFirstChild, | ||
isLastChild: isLastChild | ||
}; | ||
@@ -88,4 +90,4 @@ | ||
if (context.parentIndex !== undefined) { | ||
nodes[context.parentIndex].children.push(index); | ||
if (parentIndex !== undefined) { | ||
nodes[parentIndex].children.push(index); | ||
} | ||
@@ -100,5 +102,4 @@ | ||
// Need to reset parentIndex here as we are recursive. | ||
context.parentIndex = index; | ||
var child = children[i]; | ||
this.flattenTree(child, props, nodes, i === 0, i === children.length - 1, context); | ||
this.flattenTree(child, props, nodes, i === 0, i === children.length - 1, index, context); | ||
} | ||
@@ -803,3 +804,3 @@ } | ||
* <pre> | ||
* rowRenderer({ id, style }) | ||
* rowRenderer({ id, style, nodeInfo }) | ||
* </pre> | ||
@@ -806,0 +807,0 @@ * |
{ | ||
"name": "react-virtualized-sticky-tree", | ||
"description": "A React component for efficiently rendering tree like structures with support for position: sticky", | ||
"version": "2.0.14", | ||
"version": "2.0.15", | ||
"author": "Marc McIntyre <marchaos@gmail.com>", | ||
@@ -6,0 +6,0 @@ "license": "MIT", |
83170
1642