-
Notifications
You must be signed in to change notification settings - Fork 105
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 master checkbox to Grid #1921
base: develop
Are you sure you want to change the base?
Add master checkbox to Grid #1921
Conversation
does not account the child checkbox states
I have a first working master checkbox but the code is ugly and it does not account for the indeterminate state if child checkboxes are changed. |
needs a Behat test master checkbox must reflect the child states - unchecked/"partially checked"/"all checked" if Fomantic-UI/jQuery cannot handle this in a few lines, the JS should be put into |
Ok, it works as of now with the indeterminate state if the child checkboxes are not all in the same state. I had some issues to have the javascript statements to appear at the proper position. I first wrote them in Still I feel the manner I use the javascript is not optimal because it does not look like other atk4/ui sources. |
…/github.com/mhuser/atk4-ui into add-master-checkbox-to-grid--addSelection()
I did not find any figures of the checkbox column inside the There seem to be no documentation updates to do because the core functionalities of |
I have now only LF line endings, but it seems that Unit / Behat (latest, Chrome Slow) keeps some CRLF in comments, which lead diff to fail 🤔 |
disable auto crlf in your git config and |
Thanks, I will try it ! |
I was not able to improve my js skills enough to address this yet. Maybe we could merge this PR as is (when the quality will be satisfactory) and open a new issue for that cases where a row is removed/hidden from DOM or the grid is dynamically scrolled? A preliminary test on my production server already granted me positive feedback from the users that appreciate the possibility to check all the displayed rows in a single click 😄 When the array has multiple pages, only the visible page is selected. |
In combination with the modal bulk action #1920, this will enable to mass process of selected elements of a grid conveniently. |
Then Toast display should contain text "Selected: 1,2,3,4,5#" | ||
When I click using selector "//tr//div.ui.master.checkbox" | ||
Then I press button "Show Selection" | ||
Then Toast display should contain text "Selected: #" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TODO #1920 (comment)
When I click using selector "//tr//div.ui.master.checkbox" | ||
Then I press button "Show Selection" | ||
Then Toast display should contain text "Selected: #" | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#1920 adds support for non-UA (atk4/data User Action) bulk support
before we finish this PR, another PR should be made to add bulk support for "regular UA for multiple records" - https://github.com/atk4/data/blob/4.0.0/src/Model/UserAction.php#L32
3dfe1b5
to
1b28c35
Compare
fix #1877
Add a master checkbox into grid header that enables to toggle selection of whole visible records.