Skip to content

Commit a8aabe9

Browse files
committed
subtract padding before applying table col width preset -> #533
1 parent f4d3714 commit a8aabe9

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/main/components/table/UITable.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -624,11 +624,12 @@ const UITable: FC<TableProps & IExtendableTable & IComponentConstants> = (props)
624624
if (currentTable) {
625625
const theader = currentTable.querySelectorAll('th');
626626
let clearPrimeWidths = false;
627+
const padding = getTableHeadHorizontalPadding();
627628
for (let i = 0; i < theader.length; i++) {
628629
const col = columnWidths[i];
629630
let w = col.width as any;
630631
if (props.autoResize === false) {
631-
w = col.widthPreSet ? `${w}px` : null;
632+
w = col.widthPreSet ? `${w - padding}px` : null;
632633
if(col.widthPreSet) clearPrimeWidths = true;
633634
} else {
634635
w = `${Math.round(100 * w / estTableWidth)}%`;

0 commit comments

Comments
 (0)