Reputation: 1829
Whenever I'll click a row, it'll show a delete button. How can I access that button and put my own delete codes there?
Upvotes: 2
Views: 2421
Reputation: 1985
use like this :
const options = {
onRowsDelete:(e)=>{console.log(e.data)}, <---- e.data is a array of rows
selectableRows:'single',
}
render(){
return(
<MUIDataTable
title={"title"}
data={data}
columns={columns}
options={options}
/>
)
}
Upvotes: 1