feat:
This commit is contained in:
parent
059414bfae
commit
a6adc2be0d
|
@ -126,6 +126,7 @@ var defaultProps = {
|
|||
emptyText: function emptyText() {
|
||||
return 'No Data';
|
||||
},
|
||||
columns: [],
|
||||
minColumnWidth: 80
|
||||
};
|
||||
|
||||
|
@ -235,9 +236,9 @@ 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;
|
||||
if (nextProps.columns.length !== this.props.length && this.refs && this.refs.bodyTable) {
|
||||
this.refs.fixedColumnsBodyLeft && (this.refs.fixedColumnsBodyLeft.scrollTop = this.refs.bodyTable.scrollTop);
|
||||
this.refs.fixedColumnsBodyRight && (this.refs.fixedColumnsBodyRight.scrollTop = this.refs.bodyTable.scrollTop);
|
||||
}
|
||||
} else if (nextProps.children !== this.props.children) {
|
||||
this.columnManager.reset(null, nextProps.children);
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "bee-table",
|
||||
"version": "1.4.24",
|
||||
"version": "1.4.25",
|
||||
"description": "Table ui component for react",
|
||||
"keywords": [
|
||||
"react",
|
||||
|
|
Loading…
Reference in New Issue