Repository navigation
[6.x] Select all entries, including all pages - #15283
Merged
Merged
Conversation
… count grew. Enter/exit slide still works.
Page through listing results instead of one oversized request, track all-matching mode explicitly, and cover cancel detection plus paging in tests.
Pass modelValue 'indeterminate' instead of a ignored indeterminate prop so the indicator mounts and shows the dash when listings are partially selected.
Hide the expand control when selections already cover the total, only reset all-matching mode on search/filter/sort changes, and use meta.total in header screen-reader copy.
Member
|
Hell yea! |
jasonvarga
previously requested changes
Aug 26, 2026
jasonvarga
left a comment
Member
There was a problem hiding this comment.
Nice work — the util/listing-selections.js extraction is well factored and genuinely well covered, and moving the header checkbox from global-selection semantics to page-scoped semantics is the right model. The Checkbox/Item.vue indeterminate fix is a real catch too.
A few things need sorting before this can land:
- The select-all state survives listing-scope changes.
matchingQueryKeydoesn't account forurloradditionalParameters, so navigating between asset folders (or switching user groups) leavesselectedAllMatchingset against a different result set. Details inline. - IDs aren't deduped when paging through results.
- There's no ceiling on how many items can be selected, and the resulting bulk action runs synchronously in a single request. This is the one I'd most like your thoughts on — see the inline comment.
The rest are smaller notes, including a translation regression worth avoiding.
…'s useful there and it causes complications Asset folders are counted in meta.total but aren't selectable, so the across-pages control under-selected. Opt out via allowSelectAllMatching.
matchingQueryKey ignored url and additionalParameters, so folder/group switches could leave selectedAllMatching set against a new result set.
Overlapping pages (e.g. if the result set shifts mid-fetch) could push the same id more than once into selections.
Cap "Select all matching" at config('statamic.cp.select_all_limit')
(default 1000) so sync bulk actions aren't invited on huge result sets.
Null disables the ceiling.
Comparing against meta.total cleared the flag (and resurrected the CTA) whenever search indexes or mid-fetch deletes returned fewer IDs. Track the fetched count instead and only exit all-matching when the user removes a selection.
Use the pagination size ceiling instead of the listing's current per-page, and ask only for the id column so each page skips full augmentation.
Reserving it only while the select-all row was visible made action shortcut letters shift mid-interaction.
These values are always booleans by the time they reach the toolbar, so the Object union and toValue() unwrapping were unnecessary.
The optional call was only added for the test mock, which already defines isCancel.
Contributor
Author
|
By the way, I've removed this from |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ll-pages # Conflicts: # lang/fr.json
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…'t render after a test Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
jackmcdade
self-requested a review
October 14, 2026 00:10
jackmcdade
approved these changes
Oct 14, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description of the Problem
If you have many entries in an index, pagination occurs and it's not possible to select every single entry.
It's only possible to select the entries on the current page.
NB This PR was created in part, so that it would be possible to bulk-localize all entries in a collection, to go with the PR #15280
Before this PR
Even though there are 3 pages here, you can only effectively select page 1
What this PR Does
This PR adds select all matching results across pages on shared CP listings (entries, users, terms, assets, etc.).
Before: The header checkbox only selected the current page. You could accumulate IDs by paging, but there was no “select everything that matches this listing.”
After:
Select all rows on the current page.
If more results exist, the floating toolbar offers Select :total items across all pages (shortcut A).
That fetches every matching ID (paging through the listing API so it isn’t capped by cpPerPage) and selects them for bulk actions.
How to Reproduce
/cp/collections/blog