Skip to content

Commit 9a4b1f4

Browse files
committed
fixed #470
1 parent 071499e commit 9a4b1f4

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

packages/ve-table/src/index.jsx

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1887,6 +1887,14 @@ export default {
18871887
if (position) {
18881888
scrollTop = position.top;
18891889
}
1890+
1891+
// fix bug #470
1892+
setTimeout(() => {
1893+
scrollTo(tableContainerRef, {
1894+
top: scrollTop,
1895+
behavior: "auto",
1896+
});
1897+
}, 200);
18901898
} else {
18911899
const rowEl = this.$el.querySelector(
18921900
`tbody tr[${COMPS_CUSTOM_ATTRS.BODY_ROW_KEY}="${rowKey}"]`,
@@ -1904,7 +1912,7 @@ export default {
19041912

19051913
scrollTo(tableContainerRef, {
19061914
top: scrollTop,
1907-
behavior: "smooth",
1915+
behavior: isVirtualScroll ? "auto" : "smooth",
19081916
});
19091917
},
19101918
// scroll to col key position

0 commit comments

Comments
 (0)