7 – Null a line in the jQuery behavior of the kernel tabels so that the custom checkboxes are not affected

I have created a custom table using a form API table selection element, and inside my table, I have embedded a check box form element that is verified based on an entity field (see here for more information ). The functionality of the checkbox works well. The problem that I have discovered, however, is that the Select / Deselect all The checkbox that is created as the first column of the table also affects my custom check boxes, because when I click on the Select / unselect all check box, it also selects / deselects all check boxes in my column

The offensive code is in the jQuery behavior of tableselect, and it is a line that assumes that the only checkbox that a tableselect element will have is that which is part of the element:

if ($ (event.target) .is (& # 39; input: checkbox & # 39;)) {
// Scroll through all the check boxes and set your status in the state of selecting all check boxes.
checkboxes.each (function () {
this.checked = event.target.checked;
// Add or delete the selected class based on the status of the entire check box.
$ (this) .closest (& # 39; tr & # 39;). toggleClass (& # 39; selected & # 39 ;, this.checked);
});
// Update the title and status of the entire check box.
updateSelectAll (event.target.checked);
}

As the comment says, make all the check boxes. Sigh.

From what I've been reading, my only option is to use hook_js_alter to replace the behavior with my own version. However, that seems a bit excessive just to change a couple of lines. Is there any other way to prevent this behavior from affecting the field of my check box or am I understanding it correctly?