From 1fca74599bfdea697342e530e16daf58987e1e9f Mon Sep 17 00:00:00 2001 From: Mark Adamson Date: Sun, 28 Oct 2018 17:19:09 +0000 Subject: [PATCH] Replace use of i for column index which is no longer passed in This was part of the cause of https://github.com/adazzle/react-data-grid/issues/1343 --- packages/react-data-grid/src/Row.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/react-data-grid/src/Row.js b/packages/react-data-grid/src/Row.js index 348465f50c..2c93a02a45 100644 --- a/packages/react-data-grid/src/Row.js +++ b/packages/react-data-grid/src/Row.js @@ -56,7 +56,7 @@ class Row extends React.Component { e.preventDefault(); }; - getCell = (column, i) => { + getCell = (column) => { const CellRenderer = this.props.cellRenderer; const { idx, cellMetaData, isScrolling, row, isSelected, scrollLeft, lastFrozenColumnIndex } = this.props; const { key, formatter } = column; @@ -66,7 +66,7 @@ class Row extends React.Component { ref: (node) => { this[key] = node; }, - value: this.getCellValue(key || i), + value: this.getCellValue(key || column.idx), rowData: row, isRowSelected: isSelected, expandableOptions: this.getExpandableOptions(key),