From 8609112985e0411258d2ca46b88f268ca98687da Mon Sep 17 00:00:00 2001 From: Ashish Baravaliya Date: Wed, 7 Jun 2023 23:42:50 -0400 Subject: [PATCH] fix: scroll fix on filters changes --- src/dashboard/Data/Browser/BrowserTable.react.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/dashboard/Data/Browser/BrowserTable.react.js b/src/dashboard/Data/Browser/BrowserTable.react.js index dc19d72a54..235241ccd8 100644 --- a/src/dashboard/Data/Browser/BrowserTable.react.js +++ b/src/dashboard/Data/Browser/BrowserTable.react.js @@ -47,6 +47,10 @@ export default class BrowserTable extends React.Component { } else if (this.props.ordering !== props.ordering) { this.setState({ offset: 0 }); this.tableRef.current.scrollTop = 0; + } else if (this.props.filters.size !== props.filters.size) { + this.setState({ offset: 0 }, () => { + this.tableRef.current.scrollTop = 0; + }); } }