I'm using material-table in react js https://material-ui.com/components/tables/#material-table
I need to redirect the user to a separate edit page for the item.
I don't understand how to redirect to the edit page.
You can use the "actions" property as described in their documentation: https://material-table.com/#/docs/features/actions
<MaterialTable
...
actions={[
{
icon: 'edit',
tooltip: 'Edit User',
onClick: (event, rowData) => alert('You are editing ' + rowData.name)
},
{
icon: 'delete',
tooltip: 'Delete User',
onClick: (event, rowData) => confirm('You want to delete ' + rowData.name)
}
]}
/>
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