diff --git a/src/renderers/Table/index.tsx b/src/renderers/Table/index.tsx index 5ce20ca608b..661f73cdb3c 100644 --- a/src/renderers/Table/index.tsx +++ b/src/renderers/Table/index.tsx @@ -1081,11 +1081,11 @@ export default class Table extends React.Component { } = (this.heights = {}); heights.header = table - .querySelector('thead>tr:last-child')! - .getBoundingClientRect().height; - heights.header2 = table - .querySelector('thead>tr:first-child')! + .querySelector('thead')! .getBoundingClientRect().height; + // heights.header2 = table + // .querySelector('thead>tr:first-child')! + // .getBoundingClientRect().height; forEach( table.querySelectorAll('thead>tr:last-child>th'), @@ -1132,7 +1132,7 @@ export default class Table extends React.Component { table.querySelectorAll('thead>tr:first-child>th'), (item: HTMLElement) => { const width = widths2[item.getAttribute('data-index') as string]; - item.style.cssText += `width: ${width}px; height: ${heights.header2}px`; + item.style.cssText += `width: ${width}px; height: ${heights.header}px`; totalWidth2 += width; } );