fix: 加入ignoreScrollYChange参数

This commit is contained in:
gx 2021-02-03 14:47:16 +08:00
parent 84470fed2e
commit dcbb145328
1 changed files with 1 additions and 1 deletions

View File

@ -273,7 +273,7 @@ class Table extends Component {
// 当懒加载手动设置的scroll.y发生变化时滚动条回到顶部
const prevScrollY = prevProps.scroll.y
const currentScrollY = this.props.scroll.y
if (prevScrollY && currentScrollY && (prevScrollY !== currentScrollY) && this.props.lazyLoad) {
if (prevScrollY && currentScrollY && (prevScrollY !== currentScrollY) && this.props.lazyLoad && !this.props.ignoreScrollYChange) {
this.bodyTable.scrollTop = 0
}
// 是否传入 scroll中的y属性如果传入判断是否是整数如果是则进行比较 。bodyTable 的clientHeight进行判断