-
-
Notifications
You must be signed in to change notification settings - Fork 5.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
<Edit mutationMode="pessimistic"> produces "undoable" delete action in toolbar #5854
Comments
Thanks for the report. Indeed, the |
Sorry I misread. So we actually don't propagate mutationMode accross all actions in a view. This would be a feature request. Howver there is also an issue with the |
@despatates not related to the issue, just want to ask are you using RA Enterprise Edition? |
@nckenn No, I'm not. Why? |
Closed automatically by Github but should be kept open for the feature request |
The description mentions a bug that you've fixed. What's the feature request? |
The propagation of the |
As seen on the phone with @djhi, we agree that the bug is now fixed, so I'm closing this issue. |
@despatates can you share your AppBar? |
@nckenn My AppBar is very simple, it's a merge between react-admin and Material-UI components. https://gist.github.com/despatates/3e92ea856ee2db4ddb870e3a0bfa9c3b |
What you were expecting:
With
<Edit mutationMode="pessimistic" />
, clicking on the delete button should open a confirmation dialog like it does withundoable={false}
.What happened instead:
With
<Edit mutationMode="pessimistic" />
, clicking on the delete button deletes the resource like it does withmutationMode="undoable"
.A notification is shown with an "undo" action.
Steps to reproduce:
Create an edit form on a resource, and set pessimistic mutation mode.
In the toolbar at the bottom, click on the delete button.
record-2021-02-03_13.32.31.mp4
Related code:
The result is the same with a custom toolbar, following the documentation example:
Environment
The text was updated successfully, but these errors were encountered: