fix(滚动加载场景中支持scroll值动态修改):

This commit is contained in:
wanghaoo 2019-01-11 10:11:25 +08:00
parent b37ac9bac1
commit ed39a25923
4 changed files with 16 additions and 9 deletions

View File

@ -191,6 +191,11 @@
word-break: break-all; }
.u-table tr th:last-child {
overflow: hidden; }
.u-table tr.filterable th {
padding-top: 4px;
padding-bottom: 4px; }
.u-table tr.filterable th .filterContext {
height: 35px; }
.u-table-row-hover {
background: #e3f2fd; }
.u-table-scroll {

View File

@ -1078,7 +1078,7 @@ var Table = function (_Component) {
headerHeight = _props7.headerHeight,
columns = _props7.columns;
var headRows = this.refs.headTable ? this.refs.headTable.querySelectorAll('thead tr') : this.refs.bodyTable.querySelectorAll('thead tr');
var headRows = this.refs.headTable ? this.refs.headTable.querySelectorAll('thead') : this.refs.bodyTable.querySelectorAll('thead');
var bodyRows = this.refs.bodyTable.querySelectorAll('.' + clsPrefix + '-row') || [];
var fixedColumnsHeadRowsHeight = [].map.call(headRows, function (row) {
var height = headerHeight;

View File

@ -614,7 +614,6 @@ var TableHeader = function (_Component) {
var attr = dragborder ? { id: "u-table-drag-thead-" + this.theadKey } : {};
return _react2["default"].createElement(
"thead",
_extends({ className: clsPrefix + "-thead" }, attr, { "data-theader-fixed": "scroll", ref: function ref(_thead) {
@ -637,11 +636,19 @@ var TableHeader = function (_Component) {
if (lastShowIndex == columIndex) {
canDotDrag = "th-can-not-drag";
}
var keyTemp = {};
//避免key为undefined
if (da.dataindex && da.key === undefined) {
keyTemp.key = da.dataindex;
}
if (filterable && index == rows.length - 1) {
da.children = _this2.filterRenderType(da["filtertype"], da.dataindex, columIndex);
delete da.filterdropdownfocus;
if (da.key === undefined) {
keyTemp.key = da.dataindex + '-filterable';
}
delete da.filterdropdownfocus;
}
var thDefaultObj = {};
var thClassName = "" + da.className ? "" + da.className : '';
if (draggable) {
@ -652,11 +659,6 @@ var TableHeader = function (_Component) {
}
thClassName += " " + fixedStyle;
if (!da.fixed) {
var keyTemp = {};
//避免key为undefined
if (da.dataindex) {
keyTemp.key = da.dataindex;
}
return _react2["default"].createElement(
"th",

View File

@ -1,6 +1,6 @@
{
"name": "bee-table",
"version": "1.6.28",
"version": "1.6.29",
"description": "Table ui component for react",
"keywords": [
"react",