fix:表格更新自动定位到首行问题
This commit is contained in:
parent
a916adc042
commit
01855fa7c4
|
@ -396,6 +396,7 @@ var Table = function (_Component) {
|
|||
this.resetScrollX();
|
||||
}
|
||||
// fix:模态框中使用table,计算的滚动条宽度为0的bug
|
||||
// fix:表格首次渲染时 display:none,再显示时,未重新计算,导致表行出现错位的bug
|
||||
if (this.scrollbarWidth <= 0 && this.props.scroll.y) {
|
||||
this.scrollbarWidth = (0, _utils.measureScrollbar)();
|
||||
}
|
||||
|
|
|
@ -90,7 +90,6 @@ function bigData(Table) {
|
|||
if (nextProps.data.length > 0) {
|
||||
_this.endIndex = _this.currentIndex - nextProps.loadBuffer + _this.loadCount; //数据结束位置
|
||||
}
|
||||
this.scrollTop = 0;
|
||||
}
|
||||
//如果传currentIndex,会判断该条数据是否在可视区域,如果没有的话,则重新计算startIndex和endIndex
|
||||
if (currentIndex !== -1 && currentIndex !== this.currentIndex) {
|
||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -67,7 +67,6 @@ export default function bigData(Table) {
|
|||
if(nextProps.data.length>0){
|
||||
_this.endIndex = _this.currentIndex - nextProps.loadBuffer + _this.loadCount; //数据结束位置
|
||||
}
|
||||
this.scrollTop = 0;
|
||||
}
|
||||
//如果传currentIndex,会判断该条数据是否在可视区域,如果没有的话,则重新计算startIndex和endIndex
|
||||
if(currentIndex!==-1 && currentIndex !== this.currentIndex){
|
||||
|
|
Loading…
Reference in New Issue