Two separate bugs:
1. Build a form with a tableselect element with the #disabled property set to true. Outcome: Each row's checkbox is disabled, but the 'select all' checkbox in the header can be toggled (though it does nothing).
This checkbox should be greyed out along with the others.
2. Now use an ajax callback or other front-end code to enable the checkboxes. Outcome: The 'select all' checkbox still doesn't do anything. This is because the non-disabled checkboxes are determined on startup, and not recalculated.
I would suggest to instead get all checkboxes in the table regardless of state, and then filter out the disabled ones whenever the event is triggered. The disabled state cannot be relied upon to be static.
Comments
Comment #14
smustgrave commentedThank you for reporting this problem. We rely on issue reports like this one to resolve bugs and improve Drupal core.
Since there has been no activity here for over 8 years we are asking if this problem persists on a currently supported version of Drupal. To help, add a comment explaining if the problem still occurs or not. Any extra detail you can provide can help others who experienced this.
Since we need more information to move forward with this issue, the status is now Postponed (maintainer needs more info). If we don't receive additional information to help with the issue, it may be closed after three months.
Thanks!