I need to add image display in field Thumbnail, but now in type of display have only Data type: 'boolean', 'numeric', 'date', 'datetime', 'time', 'currency'
How can I add image to display, if exist feature, please let's me know more information. Thank you!
You can use the custom render method of the cell. Please have a look at the custom rendering section. It has an example with an image, I think.
create custom component:
like const Image= })
<MaterialTable
columns={[
**{ title: 'Ad谋', field: 'render' },**
{ title: 'Ad谋', field: 'name' },
{ title: 'Soyad谋', field: 'surname' },
{ title: 'Do臒um Y谋l谋', field: 'birthYear', type: 'numeric' },
{ title: 'Do臒um Yeri', field: 'birthCity', lookup: { 34: '陌stanbul', 63: '艦anl谋urfa' } }
]}
data={[{ **render:Image,** name: 'Mehmet', surname: 'Baran', birthYear: 1987, birthCity: 63 }]}
title="Demo Title"
/>
it should work.
Most helpful comment
You can use the custom
rendermethod of the cell. Please have a look at the custom rendering section. It has an example with an image, I think.