From 0f28207bc2fabb58ced0d6c8e8e55aeb1016fc8e Mon Sep 17 00:00:00 2001 From: ohmyguigs Date: Wed, 20 Jun 2018 16:58:18 -0300 Subject: [PATCH] Start row count on 1 instead of 0 --- react/components/Table/index.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/react/components/Table/index.js b/react/components/Table/index.js index 44e386ab5..e0479d94a 100644 --- a/react/components/Table/index.js +++ b/react/components/Table/index.js @@ -17,9 +17,10 @@ class Table extends PureComponent { const properties = Object.keys(schema.properties) // hydrate items with index when 'indexColumn' prop is true const newItems = indexColumn - ? items.map((item, index) => { - return { ...item, _reactVirtualizedIndex: index } - }) + ? items.map((item, index) => ({ + ...item, + _reactVirtualizedIndex: index + 1, + })) : items return (
@@ -52,7 +53,8 @@ class Table extends PureComponent { > {indexColumn ? ( Index} + headerRenderer={() => Index} + cellRenderer={({ cellData }) => {cellData}} dataKey="_reactVirtualizedIndex" label={indexColumnLabel} width={width / 10} // 10%