Skip to content

fix(ui): toggle list selections off on successful bulk action #12861

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

akhrarovsaid
Copy link
Contributor

What?

This PR threads an onSuccess callback to bulk actions which get called after a successful action. In this case, the callback toggles the list selections off after a successful edit many, publish many, or unpublish many.

Why?

To ensure list selections are toggled off after a successful action.

How?

By threading a new onSuccess callback through the actions' props.

Fixes #12855

Before

CleanShot.2025-06-18.at.11.24.39.mp4

After

Draft-Posts---Payload.webm

Notes:

  • I wanted to add/extend some e2e tests for this behavior inside of test/bulk-edit. However, the way the checkbox input seems to work is via defaultChecked and onInput instead of checked and onChange, which seems to make the checkboxes checked dom property lag a render behind (meaning expect().toBeChecked() can be misleading or return the wrong value). Open to suggestions here.
  • Not all actions necessarily need to clear the selection, I'm open to suggestions here as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bulk edit checkboxes not cleared on success
1 participant