From 106452ef9c2ba28230764111eca63349d02a4dee Mon Sep 17 00:00:00 2001 From: Melloware Date: Sun, 1 Oct 2023 07:50:40 -0400 Subject: [PATCH] Fix #4993: Column missing headerClassName (#4995) --- components/lib/datatable/HeaderCell.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/components/lib/datatable/HeaderCell.js b/components/lib/datatable/HeaderCell.js index 4276d68265..8e313c88b2 100644 --- a/components/lib/datatable/HeaderCell.js +++ b/components/lib/datatable/HeaderCell.js @@ -5,7 +5,7 @@ import { SortAltIcon } from '../icons/sortalt'; import { SortAmountDownIcon } from '../icons/sortamountdown'; import { SortAmountUpAltIcon } from '../icons/sortamountupalt'; import { Tooltip } from '../tooltip/Tooltip'; -import { DomHandler, IconUtils, mergeProps, ObjectUtils } from '../utils/Utils'; +import { DomHandler, IconUtils, ObjectUtils, classNames, mergeProps } from '../utils/Utils'; import { ColumnFilter } from './ColumnFilter'; import { HeaderCheckbox } from './HeaderCheckbox'; @@ -362,6 +362,7 @@ export const HeaderCell = React.memo((props) => { const rowSpan = getColumnProp('rowSpan'); const ariaSort = getAriaSort(sortMeta); const headerTooltip = getColumnProp('headerTooltip'); + const headerClassName = getColumnProp('headerClassName'); const hasTooltip = ObjectUtils.isNotEmpty(headerTooltip); const headerTooltipOptions = getColumnProp('headerTooltipOptions'); @@ -369,7 +370,7 @@ export const HeaderCell = React.memo((props) => { const header = createHeader(sortMeta); const headerCellProps = mergeProps( { - className: cx('headerCell', { headerProps: props, frozen, sortMeta, align, _isSortableDisabled, getColumnProp }), + className: classNames(headerClassName, cx('headerCell', { headerProps: props, frozen, sortMeta, align, _isSortableDisabled, getColumnProp })), style, role: 'columnheader', onClick: (e) => onClick(e),