fix row getter

This commit is contained in:
Shams mosowi
2020-10-13 16:48:47 +11:00
parent 5b27d43451
commit abb050a435

View File

@@ -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% - ${