Skip to content

Commit 2e95b3e

Browse files
committed
feat: update column alignment styles in DataTables (#1832)
1 parent 37ce32a commit 2e95b3e

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/UI/Component/DataTables.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -280,6 +280,13 @@ public function setMessageIfNoRowsFound(string $messageId)
280280
public function setColumnAlignByArray(array $columnsAlign)
281281
{
282282
foreach ($columnsAlign as $columnNumber => $align) {
283+
// replace left/right (style tags) with start/end (datatables classes)
284+
if ($align === 'left') {
285+
$align = 'start';
286+
} elseif ($align === 'right') {
287+
$align = 'end';
288+
}
289+
283290
$this->datatablesColumnDefs[] = '{ targets: ' . $columnNumber . ', className: \'text-' . $align . '\' }';
284291
}
285292
}

0 commit comments

Comments
 (0)