Skip to content

Commit

Permalink
fix: 加入ignoreScrollYChange参数
Browse files Browse the repository at this point in the history
  • Loading branch information
Gaox2025f committed Feb 3, 2021
1 parent 84470fe commit dcbb145
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Table.js
Original file line number Diff line number Diff line change
Expand Up @@ -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进行判断
Expand Down

0 comments on commit dcbb145

Please sign in to comment.