material-table icon indicating copy to clipboard operation
material-table copied to clipboard

Callback after Cancel Button

Open jitendra9nov opened this issue 7 years ago • 5 comments

First of all I am new to react, so may be I am unable to figure out this by looking into document.

I am trying to do some action after user selects 'Cancel (X)' button during Add/Edit/Delete. I have added below code but this is getting called only after user selects Save

editable={{ onRowAdd: newData => new Promise(resolve => { setTimeout(() => { resolve(); const data = [...state.data]; data.push(newData); setState({ ...state, data }); }, 600); }), onRowUpdate: (newData, oldData) => new Promise(resolve => { setTimeout(() => { resolve(); const data = [...state.data]; data[data.indexOf(oldData)] = newData; setState({ ...state, data }); }, 600); }), onRowDelete: oldData => new Promise(resolve => { setTimeout(() => { resolve(); const data = [...state.data]; data.splice(data.indexOf(oldData), 1); setState({ ...state, data }); }, 600); }), }}

jitendra9nov avatar Oct 19 '19 10:10 jitendra9nov

I have the same issue, is there any solution

syed-sep23 avatar Nov 03 '19 12:11 syed-sep23

Same here

triusis92 avatar Nov 24 '19 15:11 triusis92

Same issue, need on cancel callback and on add (+) free action callback, please let us know in case you find anything ..

itsmeganesh-cse-iiit avatar Feb 26 '20 21:02 itsmeganesh-cse-iiit

up

Dobata7 avatar Mar 31 '20 12:03 Dobata7

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. You can reopen it if it required.

stale[bot] avatar Jul 05 '20 18:07 stale[bot]