Skip to content

Commit

Permalink
fix(Table): delete checkMatchingMergeColSpan
Browse files Browse the repository at this point in the history
  • Loading branch information
chenkeyao.chenkeya committed Jan 11, 2024
1 parent 9d3a530 commit 6efa65d
Showing 1 changed file with 0 additions and 15 deletions.
15 changes: 0 additions & 15 deletions components/table/new-lock.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -308,23 +308,8 @@ export default function stickyLock(BaseComponent) {
? this.getHeaderCellNode(headerCellRowIndex, headerCellColIndex)
: this.getCellNode(scrollToRow || (dataSource[0] && dataSource[0].__rowIndex) || 0, nodeToGetWidth);
let colWidth = 0;
const checkMatchingMergeColSpan = nodeIndex => {
for (let i = nodeIndex - 1; i >= 0; i--) {
const tmpNode = this.getCellNode(
scrollToRow || (dataSource[0] && dataSource[0].__rowIndex) || 0,
i
);
if (tmpNode && tmpNode.colSpan === 1 + nodeIndex - i) {
return parseFloat(getComputedStyle(tmpNode).width) / tmpNode.colSpan || 0;
} else {
return 0;
}
}
};
if (node) {
colWidth = parseFloat(getComputedStyle(node).width) / node.colSpan || 0;
} else {
colWidth = checkMatchingMergeColSpan(nodeToGetWidth);
}

ret[tag] = (ret[tagNext] || 0) + colWidth;
Expand Down

0 comments on commit 6efa65d

Please sign in to comment.