gregnb / gregnb/mui-datatables

Confirmation dialog box with onRowDelete

Open
#1,881 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
2.7k
Forks
906
PR merge metrics
No merged PRs in 30d

Description

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](https://www.npmjs.com/package/muibox) 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 | |

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the linked CodeSandbox and the onRowDelete implementation, then compare its behavior with the async deletion changes discussed in #835 and #1664. Reproduce the confirmation flow and determine why the row is unselected before confirmation; done means the row is deleted only after confirmation and remains when deletion is rejected.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, react
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.