column动态计算后,scrollTop置为0
This commit is contained in:
parent
af91721d34
commit
5a998a13fb
|
@ -235,6 +235,10 @@ var Table = function (_Component) {
|
|||
}
|
||||
if (nextProps.columns && nextProps.columns !== this.props.columns) {
|
||||
this.columnManager.reset(nextProps.columns);
|
||||
if (this.refs && this.refs.bodyTable) {
|
||||
//如果列变了,对应的table的ScrollTop属性置为0
|
||||
this.refs.bodyTable.scrollTop = 0;
|
||||
}
|
||||
} else if (nextProps.children !== this.props.children) {
|
||||
this.columnManager.reset(null, nextProps.children);
|
||||
}
|
||||
|
|
|
@ -192,8 +192,8 @@ function sum(Table) {
|
|||
footerScroll: true,
|
||||
columns: this.props.columns,
|
||||
data: this.props.data,
|
||||
footer: this.setFooterRender,
|
||||
originWidth: true
|
||||
footer: this.setFooterRender
|
||||
// originWidth={true}
|
||||
}));
|
||||
};
|
||||
|
||||
|
|
|
@ -10803,6 +10803,10 @@
|
|||
}
|
||||
if (nextProps.columns && nextProps.columns !== this.props.columns) {
|
||||
this.columnManager.reset(nextProps.columns);
|
||||
if (this.refs && this.refs.bodyTable) {
|
||||
//如果列变了,对应的table的ScrollTop属性置为0
|
||||
this.refs.bodyTable.scrollTop = 0;
|
||||
}
|
||||
} else if (nextProps.children !== this.props.children) {
|
||||
this.columnManager.reset(null, nextProps.children);
|
||||
}
|
||||
|
@ -53712,8 +53716,8 @@
|
|||
footerScroll: true,
|
||||
columns: this.props.columns,
|
||||
data: this.props.data,
|
||||
footer: this.setFooterRender,
|
||||
originWidth: true
|
||||
footer: this.setFooterRender
|
||||
// originWidth={true}
|
||||
}));
|
||||
};
|
||||
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -156,6 +156,10 @@ class Table extends Component {
|
|||
}
|
||||
if (nextProps.columns && nextProps.columns !== this.props.columns) {
|
||||
this.columnManager.reset(nextProps.columns);
|
||||
if(this.refs && this.refs.bodyTable){
|
||||
//如果列变了,对应的table的ScrollTop属性置为0
|
||||
this.refs.bodyTable.scrollTop = 0;
|
||||
}
|
||||
} else if (nextProps.children !== this.props.children) {
|
||||
this.columnManager.reset(null, nextProps.children);
|
||||
}
|
||||
|
@ -175,6 +179,7 @@ class Table extends Component {
|
|||
this.computeTableWidth();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
componentWillUnmount() {
|
||||
|
|
|
@ -132,7 +132,7 @@ export default function sum(Table) {
|
|||
columns={this.props.columns}
|
||||
data={this.props.data}
|
||||
footer={this.setFooterRender}
|
||||
originWidth={true}
|
||||
// originWidth={true}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue