From 5f519311f6bc6254162ac6c546f50f31805d63f2 Mon Sep 17 00:00:00 2001 From: Katie McFaul Date: Thu, 29 Jan 2026 10:32:01 -0500 Subject: [PATCH 1/2] fix: allow user override of internal ThProps --- packages/module/src/DataViewTh/DataViewTh.tsx | 22 +++++++++++++------ 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/packages/module/src/DataViewTh/DataViewTh.tsx b/packages/module/src/DataViewTh/DataViewTh.tsx index 6fbeb277..55d885b0 100644 --- a/packages/module/src/DataViewTh/DataViewTh.tsx +++ b/packages/module/src/DataViewTh/DataViewTh.tsx @@ -58,13 +58,13 @@ export interface DataViewThResizableProps { id: string | number | undefined, width: number ) => void; - /** Width of the column */ + /** Starting width in pixels of the column */ width?: number; - /** Minimum width of the column */ + /** Minimum resize width in pixels of the column */ minWidth?: number; - /** Increment for keyboard navigation */ + /** Increment in pixels for keyboard navigation */ increment?: number; - /** Increment for keyboard navigation while shift is held */ + /** Increment in pixels for keyboard navigation while shift is held */ shiftIncrement?: number; /** Provides an accessible name for the resizable column via a human readable string. */ resizeButtonAriaLabel?: string; @@ -324,14 +324,22 @@ export const DataViewTh: FC = ({ ); + const classNames: string[] = []; + if (thProps?.className) { + classNames.push(thProps.className); + } + if (dataViewThClassName) { + classNames.push(dataViewThClassName); + } + return ( 0 ? { minWidth: width } : undefined} ref={thRef} - modifier="truncate" - className={dataViewThClassName} + style={width > 0 ? { minWidth: width, ...thProps?.style } : thProps?.style} + className={classNames.length > 0 ? classNames.join(' ') : undefined} {...(isResizable && { additionalContent: resizableContent })} > {content} From a52dc812561d7cf8b7ea1d9d47d6bf89c4932bd9 Mon Sep 17 00:00:00 2001 From: Katie McFaul Date: Wed, 4 Feb 2026 10:01:15 -0500 Subject: [PATCH 2/2] swap order of style declaration --- packages/module/src/DataViewTh/DataViewTh.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/module/src/DataViewTh/DataViewTh.tsx b/packages/module/src/DataViewTh/DataViewTh.tsx index 55d885b0..cc74925e 100644 --- a/packages/module/src/DataViewTh/DataViewTh.tsx +++ b/packages/module/src/DataViewTh/DataViewTh.tsx @@ -338,7 +338,7 @@ export const DataViewTh: FC = ({ {...thProps} {...props} ref={thRef} - style={width > 0 ? { minWidth: width, ...thProps?.style } : thProps?.style} + style={width > 0 ? { ...thProps?.style, minWidth: width } : thProps?.style} className={classNames.length > 0 ? classNames.join(' ') : undefined} {...(isResizable && { additionalContent: resizableContent })} >