Material UI: Can I use React component in the DataGrid cell instead of predefined cell types ('string', 'number', 'date', 'dateTime')?

React, Material UI, TypeScript
I want to put React component into the DataGrid cell. I read about cell custom types here but it didn’t help me: it allows to manage by string format only, but I need to use component instead of string. For example I want to use Link component in the cell. My code:

{ field: 'name', headerName: 'Name', width: 200,
    valueGetter: (params: ValueGetterParams): JSX.Element =>
        (<Link href={this.props.createRecordUrl(params.row.logicalName as EntityNames,
   as ID)} target="_blank">{}</Link>)

But I get the [object Object] string instead of Link component in the cell. How can I solve the problem?

Leave a Comment