feat:
This commit is contained in:
parent
059414bfae
commit
a6adc2be0d
|
@ -126,6 +126,7 @@ var defaultProps = {
|
||||||
emptyText: function emptyText() {
|
emptyText: function emptyText() {
|
||||||
return 'No Data';
|
return 'No Data';
|
||||||
},
|
},
|
||||||
|
columns: [],
|
||||||
minColumnWidth: 80
|
minColumnWidth: 80
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -235,9 +236,9 @@ var Table = function (_Component) {
|
||||||
}
|
}
|
||||||
if (nextProps.columns && nextProps.columns !== this.props.columns) {
|
if (nextProps.columns && nextProps.columns !== this.props.columns) {
|
||||||
this.columnManager.reset(nextProps.columns);
|
this.columnManager.reset(nextProps.columns);
|
||||||
if (this.refs && this.refs.bodyTable) {
|
if (nextProps.columns.length !== this.props.length && this.refs && this.refs.bodyTable) {
|
||||||
//如果列变了,对应的table的ScrollTop属性置为0
|
this.refs.fixedColumnsBodyLeft && (this.refs.fixedColumnsBodyLeft.scrollTop = this.refs.bodyTable.scrollTop);
|
||||||
this.refs.bodyTable.scrollTop = 0;
|
this.refs.fixedColumnsBodyRight && (this.refs.fixedColumnsBodyRight.scrollTop = this.refs.bodyTable.scrollTop);
|
||||||
}
|
}
|
||||||
} else if (nextProps.children !== this.props.children) {
|
} else if (nextProps.children !== this.props.children) {
|
||||||
this.columnManager.reset(null, nextProps.children);
|
this.columnManager.reset(null, nextProps.children);
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "bee-table",
|
"name": "bee-table",
|
||||||
"version": "1.4.24",
|
"version": "1.4.25",
|
||||||
"description": "Table ui component for react",
|
"description": "Table ui component for react",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"react",
|
"react",
|
||||||
|
|
Loading…
Reference in New Issue