tableHeader 容错处理

This commit is contained in:
wanghaoo 2018-10-11 22:51:54 +08:00
parent a750a2131d
commit d25c1a764f
4 changed files with 20 additions and 10 deletions

21
dist/demo.js vendored

File diff suppressed because one or more lines are too long

2
dist/demo.js.map vendored

File diff suppressed because one or more lines are too long

View File

@ -170,6 +170,11 @@ class Table extends Component {
if (this.columnManager.isAnyColumnsFixed()) {
this.syncFixedTableRowHeight();
}
//如果contentDomWidth为0则需要重新计算适应模态框中表格;
if(this.contentDomWidth == 0){
this.computeTableWidth();
}
}
componentWillUnmount() {

View File

@ -37,7 +37,7 @@ class TableHeader extends Component {
// let a = this.props.rows[0];
let _row = [];
this.props.rows[0].forEach(item => {
this.props.rows[0] && this.props.rows[0].forEach(item => {
let newItem = item.key != "checkbox" ? ObjectAssign(item) : item;
_row.push(newItem);
});