diff --git a/src/dashboard/Data/Browser/DataBrowser.react.js b/src/dashboard/Data/Browser/DataBrowser.react.js index 5fda24e448..29f10a41d7 100644 --- a/src/dashboard/Data/Browser/DataBrowser.react.js +++ b/src/dashboard/Data/Browser/DataBrowser.react.js @@ -132,6 +132,7 @@ export default class DataBrowser extends React.Component { this.setShowRowNumber = this.setShowRowNumber.bind(this); this.handleCellClick = this.handleCellClick.bind(this); this.saveOrderTimeout = null; + this.aggregationPanelRef = React.createRef(); } componentWillReceiveProps(props) { @@ -215,6 +216,15 @@ export default class DataBrowser extends React.Component { this.props.setErrorAggregatedData({}); } } + + if ( + (this.props.AggregationPanelData !== prevProps.AggregationPanelData || + this.state.selectedObjectId !== prevState.selectedObjectId) && + this.state.isPanelVisible && + this.aggregationPanelRef?.current + ) { + this.aggregationPanelRef.current.scrollTop = 0; + } } handleResizeStart() { @@ -902,7 +912,10 @@ export default class DataBrowser extends React.Component { resizeHandles={['w']} className={styles.resizablePanel} > -