Fix(challenges): scroll instruction panel to top between challenges
closes #9361
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import React, { PropTypes } from 'react';
|
||||
import ReactDom from 'react-dom';
|
||||
import { createSelector } from 'reselect';
|
||||
import { connect } from 'react-redux';
|
||||
|
||||
@@ -75,6 +76,12 @@ export class SidePanel extends PureComponent {
|
||||
});
|
||||
}
|
||||
|
||||
componentWillReceiveProps(nextProps) {
|
||||
if (this.props.title !== nextProps.title) {
|
||||
ReactDom.findDOMNode(this).scrollTop = 0;
|
||||
}
|
||||
}
|
||||
|
||||
render() {
|
||||
const {
|
||||
title,
|
||||
|
Reference in New Issue
Block a user