diff --git a/build/TableHeader.js b/build/TableHeader.js index cfb59ae..6835a00 100644 --- a/build/TableHeader.js +++ b/build/TableHeader.js @@ -622,7 +622,7 @@ var TableHeader = function (_Component) { rows.map(function (row, index) { return _react2["default"].createElement( "tr", - { style: rowStyle, className: filterable && index == rows.length - 1 ? 'filterable' : '' }, + { key: index, style: rowStyle, className: filterable && index == rows.length - 1 ? 'filterable' : '' }, row.map(function (da, columIndex, arr) { var thHover = da.drgHover ? " " + clsPrefix + "-thead th-drag-hover" : ""; delete da.drgHover; @@ -640,6 +640,7 @@ var TableHeader = function (_Component) { //避免key为undefined // if(da.dataindex && da.key ===undefined ){ keyTemp.key = da.key || da.dataindex || index + '-' + columIndex; + // } if (filterable && index == rows.length - 1) { da.children = _this2.filterRenderType(da["filtertype"], da.dataindex, columIndex); @@ -660,7 +661,6 @@ var TableHeader = function (_Component) { thClassName += " " + fixedStyle; if (!da.fixed) { - console.log(keyTemp.key); return _react2["default"].createElement( "th", _extends({}, da, keyTemp, { className: thClassName, "data-th-fixed": da.fixed, diff --git a/build/TableRow.js b/build/TableRow.js index 6549283..0fb80fc 100644 --- a/build/TableRow.js +++ b/build/TableRow.js @@ -234,7 +234,8 @@ var TableRow = function (_Component) { indent = _props9.indent, indentSize = _props9.indentSize, isHiddenExpandIcon = _props9.isHiddenExpandIcon, - fixed = _props9.fixed; + fixed = _props9.fixed, + hoverKey = _props9.hoverKey; var showSum = false; var className = this.props.className; @@ -289,7 +290,6 @@ var TableRow = function (_Component) { if (!visible) { style.display = 'none'; } - return _react2["default"].createElement( 'tr', { @@ -298,8 +298,9 @@ var TableRow = function (_Component) { onMouseEnter: this.onMouseEnter, onMouseLeave: this.onMouseLeave, className: clsPrefix + ' ' + className + ' ' + clsPrefix + '-level-' + indent, - style: style, - ref: this.bindElement + style: style + // key={hoverKey} + , ref: this.bindElement }, cells.length > 0 ? cells : _react2["default"].createElement('td', null) ); diff --git a/package.json b/package.json index 0e8993c..6087de8 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "bee-table", - "version": "1.6.29", + "version": "1.6.30", "description": "Table ui component for react", "keywords": [ "react",