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 checkbox to table header to select/unselect all #1877

Closed
mvorisek opened this issue Oct 2, 2022 · 5 comments · Fixed by #1921
Closed

Add checkbox to table header to select/unselect all #1877

mvorisek opened this issue Oct 2, 2022 · 5 comments · Fixed by #1921

Comments

@mvorisek
Copy link
Member

mvorisek commented Oct 2, 2022

When row selection is enabled, there should be "master" checkbox in the table header to select/unselect all rows.

Feature request from #1727 (comment).

It should probably still select the rows in the current page only.

related demo: demos/collection/grid.php

maybe add support for shift key to add support for range selection

@mhuser
Copy link
Contributor

mhuser commented Oct 28, 2022

I noticed Multiline form control already has such a top checkbox. I will need to investigate where it is done in the code.

@mvorisek
Copy link
Member Author

Isn't that only for Multiline? (not for Table/CRUD)

@mhuser
Copy link
Contributor

mhuser commented Oct 28, 2022

Indeed. I could maybe just use getHeaderCellHtml of Checkbox Column type.

@mvorisek
Copy link
Member Author

mvorisek commented Oct 28, 2022

We need to move from vue used in Multiline to render everything via pure php to dedup the code and use standard php components purely.

@mhuser
Copy link
Contributor

mhuser commented Oct 28, 2022

image

Turned out that adding the checkbox in the header was easier than expected thanks to the existing Checkbox column type.
But I will still need to link it to the toggling action and that will probably be the tricky part.

#1921

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

Successfully merging a pull request may close this issue.

2 participants