Skip to content

Commit 667675c

Browse files
fix: Scroll position is preserved when re-opening the same class in data browser via navigation bar (#2445)
1 parent b1542ab commit 667675c

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,10 @@ export default class BrowserTable extends React.Component {
4747
} else if (this.props.ordering !== props.ordering) {
4848
this.setState({ offset: 0 });
4949
this.tableRef.current.scrollTop = 0;
50+
} else if (this.props.filters.size !== props.filters.size) {
51+
this.setState({ offset: 0 }, () => {
52+
this.tableRef.current.scrollTop = 0;
53+
});
5054
}
5155
}
5256

0 commit comments

Comments
 (0)