From d028abd3d4937029c0f55781e732938f71cd49fc Mon Sep 17 00:00:00 2001 From: maltekiessling <30420110+maltekiessling@users.noreply.github.com> Date: Tue, 4 Aug 2026 18:37:00 +0200 Subject: [PATCH] Fix styles.table prop handling for functions and arrays --- package/DataTable.tsx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/package/DataTable.tsx b/package/DataTable.tsx index facdd37a..3fb8c68e 100644 --- a/package/DataTable.tsx +++ b/package/DataTable.tsx @@ -321,11 +321,11 @@ export function DataTable({ }, classNames?.table )} - style={{ - ...styles?.table, - ...(dragToggle.isLocked ? { tableLayout: 'fixed' } : null), - ...(dragToggle.tableWidth != null ? { width: `${dragToggle.tableWidth}px` } : null), - }} + style={[ + styles?.table, + dragToggle.isLocked ? { tableLayout: 'fixed' } : undefined, + dragToggle.tableWidth != null ? { width: `${dragToggle.tableWidth}px` } : undefined, + ]} data-striped={(recordsLength && striped) || undefined} data-highlight-on-hover={highlightOnHover || undefined} {...otherProps}