From 72d1663f354a7e419632bd3b1d17a860ef83a550 Mon Sep 17 00:00:00 2001 From: Shams mosowi Date: Sat, 10 Oct 2020 14:58:01 +1100 Subject: [PATCH] cleanup row getter --- www/src/components/Table/index.tsx | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/www/src/components/Table/index.tsx b/www/src/components/Table/index.tsx index 8676262b..4abf8aaf 100644 --- a/www/src/components/Table/index.tsx +++ b/www/src/components/Table/index.tsx @@ -123,17 +123,15 @@ export default function Table() { const rowHeight = tableState.config.rowHeight; const rows = tableState.rows; - //const rowGetter = (rowIdx: number) => rows[rowIdx]; - const rowGetter = (rowIdx: number) => ({ - ...rows[rowIdx], - ...columns.reduce( + + const rowGetter = (rowIdx: number) => + columns.reduce( (acc, currColumn) => ({ ...acc, [currColumn.key]: _get(rows[rowIdx], currColumn.key), }), {} - ), - }); + ); let tableWidth: any = `calc(100% - ${ DRAWER_COLLAPSED_WIDTH