I am exporting DataGrid @mui/x-data-grid
table using CustomToolbar
I have one of the columns as below
{
field: 'industry_type',
headerName: 'Industry',
renderCell: (params) => {
const industry = params.row.industry_type;
return (
<>
<p>{`${industry.code}- ${industry.value}`} </p>
</>
);
}
}
The csv file downloaded from export option gives the value as [object Object]
How do I get the actual value in csv downloaded file? I need help in fixing this. Thanks.
valueGetter
works for exports. In MUI4 v at least though, note thatvalueGetter
supercedes therenderCell
, so you would lose the <p> breaks in your render - which in this example you probably don't need anyway, but just a heads up. – Barbee