Skip to content

Commit 8af69bc

Browse files
committed
fix: momentum scroll persists on cached panel
1 parent e9693c1 commit 8af69bc

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/dashboard/Data/Browser/DataBrowser.react.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,14 @@ export default class DataBrowser extends React.Component {
223223
this.state.isPanelVisible &&
224224
this.aggregationPanelRef?.current
225225
) {
226-
this.aggregationPanelRef.current.scrollTop = 0;
226+
const panel = this.aggregationPanelRef.current;
227+
panel.scrollTop = 0;
228+
panel.style.overflowY = 'hidden';
229+
setTimeout(() => {
230+
if (panel === this.aggregationPanelRef.current) {
231+
panel.style.overflowY = 'auto';
232+
}
233+
}, 0);
227234
}
228235
}
229236

0 commit comments

Comments
 (0)