mirror of
https://github.com/rowyio/rowy.git
synced 2026-07-12 13:28:48 +02:00
cleanup row getter
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user