Skip to content

Commit 4aa8aa3

Browse files
committed
🐛 Fix Table fixed columns height 1px bug
the last th of thead has border which make it 1px higher close ant-design/ant-design#20126
1 parent 054b130 commit 4aa8aa3

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/Table.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -316,9 +316,8 @@ class Table<ValueType> extends React.Component<TableProps<ValueType>, TableState
316316
? this.headTable.querySelectorAll('thead')
317317
: this.bodyTable.querySelectorAll('thead');
318318
const bodyRows = this.bodyTable.querySelectorAll(`.${prefixCls}-row`) || [];
319-
const fixedColumnsHeadRowsHeight = [].map.call(
320-
headRows,
321-
(row: HTMLElement) => row.getBoundingClientRect().height || 'auto',
319+
const fixedColumnsHeadRowsHeight = [].map.call(headRows, (row: HTMLElement) =>
320+
row.getBoundingClientRect().height ? row.getBoundingClientRect().height - 1 : 'auto',
322321
);
323322
const state = this.store.getState();
324323
const fixedColumnsBodyRowsHeight = [].reduce.call(

0 commit comments

Comments
 (0)