Skip to content

Commit

Permalink
ver. 9.4.4
Browse files Browse the repository at this point in the history
  • Loading branch information
光弘 committed Aug 14, 2018
1 parent 4fc0693 commit 08b7f15
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "uxcore-table",
"version": "9.4.3",
"version": "9.4.4",
"description": "table ui component for react",
"repository": "https://github.com/uxcore/uxcore-table.git",
"author": "zhouquan.yezq",
Expand Down
4 changes: 4 additions & 0 deletions src/Table.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -359,13 +359,17 @@ class Table extends React.Component {
const { leftFixedMaxWidth } = this.props;
if (!leftFixedMaxWidth || !this.headerFixed || !this.mainTable) return;
const fixedColumnsWidth = this.headerFixed.getFixedColumnsWidth();
console.log(fixedColumnsWidth);
if (fixedColumnsWidth && fixedColumnsWidth !== this.fixedColumnsWidth) {
this.fixedColumnsWidth = fixedColumnsWidth;
const offset = leftFixedMaxWidth - fixedColumnsWidth;
if (offset < 0) {
this.mainTable.style.position = 'relative';
this.mainTable.style.left = `${offset}px`;
this.mainTable.style.width = `calc(100% + ${-offset}px)`;
} else {
this.mainTable.style.left = '0px';
this.mainTable.style.width = 'calc(100%)';
}
}
}
Expand Down

0 comments on commit 08b7f15

Please sign in to comment.