From 77b69d0715792408bd1b4d03a00db612be7f2c20 Mon Sep 17 00:00:00 2001 From: jsconan Date: Wed, 18 Sep 2024 14:29:54 +0200 Subject: [PATCH 1/3] feat: forward a CSS class for the datatable action buttons --- src/datatable.js | 3 ++- src/datatable/tpl/button.tpl | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/datatable.js b/src/datatable.js index 8555e010..6c930791 100644 --- a/src/datatable.js +++ b/src/datatable.js @@ -887,7 +887,8 @@ const dataTable = { const disabled = getPropertyValue('disabled', action, nextData); const icon = getPropertyValue('icon', action, nextData); const label = getPropertyValue('label', action, nextData); - const $actionButton = $(buttonTpl({ id, icon, label, title, disabled })); + const cls = getPropertyValue('cls', action, nextData); + const $actionButton = $(buttonTpl({ id, icon, label, title, disabled, cls })); if (!hidden) { $actionCell.append('\n').append($actionButton); diff --git a/src/datatable/tpl/button.tpl b/src/datatable/tpl/button.tpl index 3bc2befe..d7731754 100644 --- a/src/datatable/tpl/button.tpl +++ b/src/datatable/tpl/button.tpl @@ -1,4 +1,4 @@ -