Skip to content

Commit 65bbdc7

Browse files
committed
Remove unnecessary getNodeKey calls
1 parent ba5952f commit 65bbdc7

File tree

1 file changed

+1
-11
lines changed

1 file changed

+1
-11
lines changed

src/react-sortable-tree.js

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -328,7 +328,6 @@ class ReactSortableTree extends Component {
328328
className,
329329
innerStyle,
330330
rowHeight,
331-
getNodeKey,
332331
isVirtualized,
333332
} = this.props;
334333
const {
@@ -371,10 +370,6 @@ class ReactSortableTree extends Component {
371370
rowRenderer={({ index, style: rowStyle }) => this.renderRow(
372371
rows[index],
373372
index,
374-
getNodeKey({
375-
node: rows[index].node,
376-
treeIndex: rows[index].treeIndex,
377-
}),
378373
rowStyle,
379374
() => (rows[index - 1] || null),
380375
matchKeys
@@ -389,10 +384,6 @@ class ReactSortableTree extends Component {
389384
list = rows.map((row, index) => this.renderRow(
390385
row,
391386
index,
392-
getNodeKey({
393-
node: row.node,
394-
treeIndex: row.treeIndex,
395-
}),
396387
{ height: typeof rowHeight !== 'function' ? rowHeight : rowHeight({ index }) },
397388
() => (rows[index - 1] || null),
398389
matchKeys
@@ -412,7 +403,6 @@ class ReactSortableTree extends Component {
412403
renderRow(
413404
{ node, parentNode, path, lowerSiblingCounts, treeIndex },
414405
listIndex,
415-
key,
416406
style,
417407
getPrevRow,
418408
matchKeys
@@ -446,7 +436,7 @@ class ReactSortableTree extends Component {
446436
return (
447437
<TreeNodeRenderer
448438
style={style}
449-
key={key}
439+
key={nodeKey}
450440
treeIndex={treeIndex}
451441
listIndex={listIndex}
452442
getPrevRow={getPrevRow}

0 commit comments

Comments
 (0)