I am using material-table of Reactjs npm package, I want display a link with url inside table cells. but it is displaying it as string. Any idea how to display link
data: [
{
subject: 'Announcment',
type: 1,
approver: 'john',
state: 1,
view: "<Link to="/users">cell</Link>",
},
]
Yes Here is the solution.
columns: [
{
title: 'Analytics',
field: 'analytics',
render: rowData => <Link to="/{rowData.url}">view</Link>,,
},
],
and
data: [
{
subject: 'Announcment',
type: 1,
approver: 'john',
state: 1,
url: "/users",
},
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With