Skip to content
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

Fix BulkDeleteWithConfirmButton does not work when mutationMode is undoable #7948

Merged
merged 2 commits into from
Jul 8, 2022

Conversation

fzaninotto
Copy link
Member

Problem

When using a BulkActions component with a bulk delete that is both with confirm and undoable, the delete never occurs

const PostListBulkActions = props => (
    <BulkDeleteWithConfirmButton {...props} mutationMode="undoable" />
);

Solution

In undoable mode, it's the the notification's role to trigger the mutation. If the notification doesn't know it's undoable, the mutation never occurs.

@antoinefricker antoinefricker added this to the 4.2.2 milestone Jul 8, 2022
@antoinefricker antoinefricker merged commit 13f433c into master Jul 8, 2022
@antoinefricker antoinefricker deleted the bulkdeletewithconfirmundoable branch July 8, 2022 08:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
RFR Ready For Review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants