diff --git a/core/misc/tableselect.es6.js b/core/misc/tableselect.es6.js
index aa0aa34..554036e 100644
--- a/core/misc/tableselect.es6.js
+++ b/core/misc/tableselect.es6.js
@@ -70,33 +70,42 @@
// Find all
with class select-all, and insert the check all checkbox.
$table
.find('th.select-all')
- .prepend($(Drupal.theme('checkbox')).attr('title', strings.selectAll))
- .on('click', (event) => {
- if ($(event.target).is('input[type="checkbox"]')) {
- // Loop through all checkboxes and set their state to the select all
- // checkbox' state.
- checkboxes.each(function () {
- const $checkbox = $(this);
- const stateChanged =
- $checkbox.prop('checked') !== event.target.checked;
-
- /**
- * @checkbox {HTMLElement}
- */
- if (stateChanged) {
- $checkbox.prop('checked', event.target.checked).trigger('change');
+ .each(function() {
+ let $this = $(this);
+
+ let $selectAllCheckbox = $('').attr('title', strings.selectAll).attr('id', Math.random().toString( 16 ).slice( 2, 10 ));
+ let $selectAllLabel = $(' |