目前使用自定义样式的行/列,也将样式的聚合列。如何在不影响聚合行的情况下设置此行的样式?https://codesandbox.io/s/frosty-euler-1szk2y?file=/demo.tsx
v1l68za41#
您可以在renderCell中设置它:=
{ field: SomeFieldName, headerName: SomeHeaderName, type: number, width: 140, renderCell: renderCellFunction, } export const renderCellFunction = (params: GridRenderCellParams<Partial<RowDataType>, any, any, GridTreeNodeWithRender>) => { if (params.aggregation) { return <Typography color="primary.main">{params.formattedValue}</Typography>; } return ( <div> <Typography>{params.row.xyz}</Typography> </div> ); };
1条答案
按热度按时间v1l68za41#
您可以在renderCell中设置它:=