mui-datatables icon indicating copy to clipboard operation
mui-datatables copied to clipboard

Confirmation dialog box with onRowDelete

Open StefanIgnjatovic12 opened this issue 3 years ago • 0 comments

Hi. I am trying to display a confirmation dialog before a row gets deleted. I saw #835 and #1664 which added async functionality to deleting rows so maybe my implementation is wrong? I would appreciate any help, thanks in advance.

Expected Behavior

Confirmation box is opened upon user deleting row, if confirmed the row gets deleted if not false is returned.

Current Behavior

At present when the confirmation dialog box opens, the row gets unselected and it doesn't get deleted following confirmation.

Steps to Reproduce (for bugs)

https://codesandbox.io/s/friendly-gagarin-8s96sf?file=/src/App.js I basically just copied the sandbox from #835. I'm using miubox for the dialogue box and had tried the React dialogue component before too.

Your Environment

Tech Version
Material-UI 5.4.3
MUI-datatables 4.1.2
React 17.0.2
browser Chrome 98.0.4758.102
etc

StefanIgnjatovic12 avatar Mar 06 '22 18:03 StefanIgnjatovic12