File tree Expand file tree Collapse file tree 2 files changed +13
-3
lines changed Expand file tree Collapse file tree 2 files changed +13
-3
lines changed Original file line number Diff line number Diff line change @@ -316,8 +316,9 @@ class Table<ValueType> extends React.Component<TableProps<ValueType>, TableState
316
316
? this . headTable . querySelectorAll ( 'thead' )
317
317
: this . bodyTable . querySelectorAll ( 'thead' ) ;
318
318
const bodyRows = this . bodyTable . querySelectorAll ( `.${ prefixCls } -row` ) || [ ] ;
319
- const fixedColumnsHeadRowsHeight = [ ] . map . call ( headRows , ( row : HTMLElement ) =>
320
- row . getBoundingClientRect ( ) . height ? row . getBoundingClientRect ( ) . height - 0.5 : 'auto' ,
319
+ const fixedColumnsHeadRowsHeight = [ ] . map . call (
320
+ headRows ,
321
+ ( row : HTMLElement ) => row . getBoundingClientRect ( ) . height || 'auto' ,
321
322
) ;
322
323
const state = this . store . getState ( ) ;
323
324
const fixedColumnsBodyRowsHeight = [ ] . reduce . call (
Original file line number Diff line number Diff line change @@ -34,7 +34,16 @@ function TableHeaderRow({
34
34
const HeaderCell = components . header . cell ;
35
35
const rowProps = onHeaderRow ( row . map ( cell => cell . column ) , index ) ;
36
36
const customStyle = rowProps ? rowProps . style : { } ;
37
- const style = { height, ...customStyle } ;
37
+ const style = {
38
+ // https://github.com/ant-design/ant-design/issues/20126
39
+ // https://github.com/ant-design/ant-design/issues/20269
40
+ // https://github.com/ant-design/ant-design/issues/20495
41
+ height :
42
+ row . length > 1 && index === 0 && height && height !== 'auto'
43
+ ? parseInt ( height . toString ( ) , 10 )
44
+ : height ,
45
+ ...customStyle ,
46
+ } ;
38
47
39
48
return (
40
49
< HeaderRow { ...rowProps } style = { style } >
You can’t perform that action at this time.
0 commit comments