I'm using the Mui Grid component and want to render the content of one column based on some conditions of the data.
How can I basically implement a conditional in the renderCell method?
const columns: GridColDef[] = [
{ field: 'offer_status',
headerName: 'Status',
flex: 1,
width: 50,
renderCell: (params) => ({
if (params.value == 'is_sent')
return <div>Sent</div>
}
)},
This doesn't work - I assume due to the syntax (unexpected token).
