Closed rahulcs1988ai closed 4 months ago
Yes, you just pass in your function as the onDelete
prop. Your function should return false
or an error string if it shouldn't do the delete action, and nothing if it should proceed as normal. Something like:
onDelete={
( {name} ) => {
const result = confirm(`Are you sure you want to delete ${name}?`)
if (result === false) return false // The data won't be updated
else return // The data will be updated
}
}
See Update functions for more detail.
Hope that helps.
@CarlosNZ Thank you so much :)
is there any method to override the onDelete functionality so that I can show a confirmation popup before deleting a record