CompactTable and row props
Is it possible to set row props based on the row data in CompactTable? For example, I would like a row background based on the data status (red/green).
If not, could we introduce a new property getRowProps: (item: TableNode, index: number) => CompactRowProps to CompactTableProps? The logic should be that if this property is provided, it would be used to create rowProps that are passed to CompactRow.
I would check out the Composed Table and style the rows as you wish over there.
Composed table requires a lot of other work (generating columns, cells, etc.) CompactTable is really a great fit for data-heavy apps, its configuration is very straightforward! Only the row-specific props are missing. One would have to copy-paste (and then keep up-to-date with new RCT versions) the whole CompactTable, VirtualizedTable, and NormalTable to add a simple logic like:
(in NormalTable.tsx)
...
<Body>
{tableList.map((item: TableNode, index: number) => (
<CompactRow
key={item.id}
index={index}
item={item}
columns={columns}
rowProps={getRowProps ? getRowProps(item, index) : rowProps} // only this has been changed
rowOptions={rowOptions}
{...tableProps}
/>
))}
</Body>