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

IBX-1476: Disable Select All checkbox when all the checkboxes in the table row are disabled #239

Conversation

GrabowskiM
Copy link
Contributor

@GrabowskiM GrabowskiM commented Jan 25, 2022

@@ -82,6 +82,7 @@
}) }}
{% include '@ibexadesign/ui/component/table/table.html.twig' with {
headline: 'bookmark.table.header'|trans|desc('Bookmarks') ~ ' (' ~ pager.count ~ ')',
class: 'ibexa-table--has-bulk-checkbox',
Copy link
Contributor

@tischsoic tischsoic Jan 25, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this should be done as a separate table component property e.g. has_bulk_checkbox: true to ensure table component encapsulation.

@@ -52,6 +52,12 @@

const checkboxesChangeListeners = new Map();
headCellsWithCheckboxes.forEach((headCellsWithCheckbox) => {
const hasBulkCheckbox = !!headCellsWithCheckbox.querySelector('.ibexa-table__header-cell-checkbox:not(.ibexa-table__header-cell-checkbox--custom-init)');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
const hasBulkCheckbox = !!headCellsWithCheckbox.querySelector('.ibexa-table__header-cell-checkbox:not(.ibexa-table__header-cell-checkbox--custom-init)');
const isCustomInit = !!headCellsWithCheckbox.querySelector('.ibexa-table__header-cell-checkbox:not(.ibexa-table__header-cell-checkbox--custom-init)');

@dew326 dew326 merged commit 0d95ff9 into main Jan 26, 2022
@dew326 dew326 deleted the IBX-1476-disable-select-all-checkbox-when-all-the-checkboxes-in-the-table-row-are-disabled branch January 26, 2022 14:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants