diff --git a/assets/controllers/elements/datatables/parts_controller.js b/assets/controllers/elements/datatables/parts_controller.js
index 23e110af..12c9d5c3 100644
--- a/assets/controllers/elements/datatables/parts_controller.js
+++ b/assets/controllers/elements/datatables/parts_controller.js
@@ -42,11 +42,11 @@ export default class extends DatatablesController {
const selectPanel = this.selectPanelTarget;
- //Toggle action button based on selection
+ //Enable action button based on selection
if (count > 0) {
- document.getElementById("selectPanel_submit").disabled = false;
+ selectPanel.querySelector('button[type="submit"]').disabled = false;
} else {
- document.getElementById("selectPanel_submit").disabled = true;
+ selectPanel.querySelector('button[type="submit"]').disabled = true;
}
//Update selection count text
diff --git a/templates/components/datatables.macro.html.twig b/templates/components/datatables.macro.html.twig
index 28885432..009938a2 100644
--- a/templates/components/datatables.macro.html.twig
+++ b/templates/components/datatables.macro.html.twig
@@ -79,7 +79,7 @@
{# This is left empty, as this will be filled by Javascript #}
-
+