|
@@ -62,23 +62,24 @@ export const TableRow = <T, TId extends IdType, OT = never>({
|
|
|
if (!isColumnElement<T, TId>(child)) {
|
|
|
return child;
|
|
|
}
|
|
|
- const { cell, field, maxWidth, className } = child.props;
|
|
|
+ const { cell, field, maxWidth, customTd } = child.props;
|
|
|
|
|
|
const Cell = cell as React.FC<TableCellProps<T, TId, OT>> | undefined;
|
|
|
+ const TdComponent = customTd || Td;
|
|
|
|
|
|
- return Cell ? (
|
|
|
- <Td className={className} maxWidth={maxWidth}>
|
|
|
- <Cell
|
|
|
- tableState={tableState}
|
|
|
- hovered={hovered}
|
|
|
- rowIndex={index}
|
|
|
- dataItem={dataItem}
|
|
|
- />
|
|
|
- </Td>
|
|
|
- ) : (
|
|
|
- <Td className={className} maxWidth={maxWidth}>
|
|
|
- {field && propertyLookup(field, dataItem)}
|
|
|
- </Td>
|
|
|
+ return (
|
|
|
+ <TdComponent maxWidth={maxWidth}>
|
|
|
+ {Cell ? (
|
|
|
+ <Cell
|
|
|
+ tableState={tableState}
|
|
|
+ hovered={hovered}
|
|
|
+ rowIndex={index}
|
|
|
+ dataItem={dataItem}
|
|
|
+ />
|
|
|
+ ) : (
|
|
|
+ field && propertyLookup(field, dataItem)
|
|
|
+ )}
|
|
|
+ </TdComponent>
|
|
|
);
|
|
|
})}
|
|
|
</tr>
|