diff --git a/CHANGELOG.md b/CHANGELOG.md index db7c7d4..8bfd1a1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,8 @@ + +## [1.6.11](https://github.com/tinper-bee/bee-table/compare/v1.6.9...v1.6.11) (2018-12-06) + + + ## [1.6.9](https://github.com/tinper-bee/bee-table/compare/v1.6.8...v1.6.9) (2018-12-05) @@ -139,7 +144,7 @@ -## [1.5.1](https://github.com/tinper-bee/bee-table/compare/v1.5.0...v1.5.1) (2018-11-19) +## [1.5.1](https://github.com/tinper-bee/bee-table/compare/v1.5.0...v1.5.1) (2018-11-18) diff --git a/build/FilterDropDown.js b/build/FilterDropDown.js index cfa87a0..99e1f12 100644 --- a/build/FilterDropDown.js +++ b/build/FilterDropDown.js @@ -63,21 +63,19 @@ var FilterDropDown = function (_Component) { filterDropdownType = _this$props.filterDropdownType; if (onSelectDropdown) { - if (dataText != "") { - if (filterDropdownType == 'string') { - _this.setState({ - selectValue: [item.key] - }, function () { - onSelectDropdown(item); - }); - } - if (filterDropdownType == 'number') { - _this.setState({ - selectNumberValue: [item.key] - }, function () { - onSelectDropdown(item); - }); - } + if (filterDropdownType == 'string') { + _this.setState({ + selectValue: [item.key] + }, function () { + onSelectDropdown(item); + }); + } + if (filterDropdownType == 'number') { + _this.setState({ + selectNumberValue: [item.key] + }, function () { + onSelectDropdown(item); + }); } } }; @@ -87,8 +85,8 @@ var FilterDropDown = function (_Component) { if (onClickClear) { _this.setState({ - selectValue: [], - selectNumberValue: [] + // selectValue: [], + // selectNumberValue: [] }, function () { onClickClear(); }); diff --git a/build/Table.js b/build/Table.js index cc94f35..cde3b64 100644 --- a/build/Table.js +++ b/build/Table.js @@ -914,10 +914,15 @@ var Table = function (_Component) { ) ); } - + var leftFixedWidth = this.columnManager.getLeftColumnsWidth(); + var rightFixedWidth = this.columnManager.getRightColumnsWidth(); + var parStyle = {}; + if (!fixed) { + parStyle = { 'marginLeft': leftFixedWidth, 'marginRight': rightFixedWidth }; + } return _react2["default"].createElement( - 'span', - null, + 'div', + { style: parStyle }, headTable, BodyTable ); @@ -1124,7 +1129,7 @@ var Table = function (_Component) { { className: clsPrefix + '-content' }, _react2["default"].createElement( 'div', - { className: isTableScroll ? clsPrefix + '-scroll' : '', style: { 'marginLeft': leftFixedWidth } }, + { className: isTableScroll ? clsPrefix + '-scroll' : '' }, this.getTable({ columns: this.columnManager.groupedColumns() }), this.getEmptyText(), this.getFooter() diff --git a/build/TableHeader.js b/build/TableHeader.js index e550c17..7317d49 100644 --- a/build/TableHeader.js +++ b/build/TableHeader.js @@ -583,7 +583,8 @@ var TableHeader = function (_Component) { delete da.drgHover; var fixedStyle = ""; var canDotDrag = ""; - if (!fixed && (da.fixed || rows[0][columIndex].fixed)) { + //主表格下、固定列或者是过滤行中含有固定列时添加该属性 + if (!fixed && (da.fixed || filterable && index == rows.length - 1 && rows[0][columIndex].fixed)) { fixedStyle = clsPrefix + "-row-fixed-columns-in-body"; } @@ -607,8 +608,8 @@ var TableHeader = function (_Component) { if (!da.fixed) { return _react2["default"].createElement( "th", - { key: 'table-header-th-' + da.dataindex, className: thClassName, "data-th-fixed": da.fixed, - "data-line-key": da.key, "data-line-index": columIndex, "data-th-width": da.width }, + _extends({}, da, { key: 'table-header-th-' + da.dataindex, className: thClassName, "data-th-fixed": da.fixed, + "data-line-key": da.key, "data-line-index": columIndex, "data-th-width": da.width }), da.children, dragborder ? _react2["default"].createElement( "div", diff --git a/package.json b/package.json index bd2ff7f..fc5e18e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "bee-table", - "version": "1.6.10-beta.1", + "version": "1.6.11", "description": "Table ui component for react", "keywords": [ "react",