feat(options-list): add a select-all header checkbox#119
Merged
Conversation
Running bulk actions (quarantine / export / delete) against every visible row took one click per row — tedious on a 50-row page. Add a header checkbox that toggles selection for every non-protected visible row with tri-state behavior: - Empty → nothing selected on the current page. - Checked → every selectable visible row is selected. - Indeterminate → some but not all selectable rows are selected. WordPress-Core accessor rows stay unselectable (they already cannot be individually toggled), so the header checkbox never flips them either. The header control uses a native <input type="checkbox"> instead of WordPress' CheckboxControl because only the native element exposes the `indeterminate` DOM property, which we set through a ref. Japanese translation shipped; JSON chunks regenerated. Closes #118
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.
Summary
Closes #118
Implementation note
The header uses a native `<input type="checkbox">` with a ref so the `indeterminate` DOM property can be flipped from `useEffect`. `@wordpress/components` `CheckboxControl` does not expose that property.
Test plan