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

Add SelectAllButton to BulkActionsToolbar #9043

Closed
wants to merge 1 commit into from
Closed

Conversation

fzaninotto
Copy link
Member

@fzaninotto fzaninotto commented Jun 25, 2023

Problem

When a user selects all the records of a given page, they often want to select all the records regardless of pagination. Doing so is cumbersome as it implies browsing every page and clicking on "select all".

Solution

Add a "select all" button allowing to expand the selection to the same query (with the same filters), but without pagination.

SelectAllButton.mp4

Todo

  • Make it work
  • Add tests
  • Add stories
  • Document it

@fzaninotto fzaninotto added the WIP Work In Progress label Jun 25, 2023
@fzaninotto fzaninotto changed the base branch from master to next June 25, 2023 09:38
@fzaninotto fzaninotto changed the title Select-all-button Add SelectAllButton to BulkActionsToolbar Jun 25, 2023
@fzaninotto
Copy link
Member Author

fzaninotto commented Jun 25, 2023

The implementation is wrong: it won't work for a datagrid inside a ReferenceManyField. The selectAll callback must be defined at the controller level, and stored in the ListContext.

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

Successfully merging this pull request may close these issues.

1 participant