cleanup row getter

This commit is contained in:
Shams mosowi
2020-10-10 14:58:01 +11:00
parent fec5974921
commit 72d1663f35

View File

@@ -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