From abb050a4359f606cf6434a2e4dbebae4c8fb3371 Mon Sep 17 00:00:00 2001 From: Shams mosowi Date: Tue, 13 Oct 2020 16:48:47 +1100 Subject: [PATCH] fix row getter --- www/src/components/Table/index.tsx | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/www/src/components/Table/index.tsx b/www/src/components/Table/index.tsx index 4abf8aaf..90626ad3 100644 --- a/www/src/components/Table/index.tsx +++ b/www/src/components/Table/index.tsx @@ -126,11 +126,15 @@ export default function Table() { const rowGetter = (rowIdx: number) => columns.reduce( - (acc, currColumn) => ({ - ...acc, - [currColumn.key]: _get(rows[rowIdx], currColumn.key), - }), - {} + (acc, currColumn) => { + if ((currColumn.key as string).includes(".")) { + return { + ...acc, + [currColumn.key]: _get(rows[rowIdx], currColumn.key), + }; + } else return acc; + }, + { ...rows[rowIdx] } ); let tableWidth: any = `calc(100% - ${