PLT-5154 Scroll RHS to the top when search term changes (#5027)

Этот коммит содержится в:
Joram Wilander
2017-01-10 05:40:37 -05:00
коммит произвёл George Goldberg
родитель 37109e5a4f
Коммит 548adb178e

Просмотреть файл

@@ -124,6 +124,12 @@ export default class SearchResults extends React.Component {
window.removeEventListener('resize', this.handleResize);
}
componentDidUpdate(prevProps, prevState) {
if (this.state.searchTerm !== prevState.searchTerm) {
this.resize();
}
}
handleResize() {
this.setState({
windowWidth: Utils.windowWidth(),