diff --git a/package.json b/package.json index c02cb26..14c36df 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/src/Table.jsx b/src/Table.jsx index 4eafd28..918acee 100644 --- a/src/Table.jsx +++ b/src/Table.jsx @@ -359,6 +359,7 @@ 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; @@ -366,6 +367,9 @@ class Table extends React.Component { 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%)'; } } }