You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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>
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
toCompactTableProps
? The logic should be that if this property is provided, it would be used to createrowProps
that are passed toCompactRow
.The text was updated successfully, but these errors were encountered: