PLT-5154 Scroll RHS to the top when search term changes (#5027)
Этот коммит содержится в:
коммит произвёл
George Goldberg
родитель
37109e5a4f
Коммит
548adb178e
@@ -124,6 +124,12 @@ export default class SearchResults extends React.Component {
|
|||||||
window.removeEventListener('resize', this.handleResize);
|
window.removeEventListener('resize', this.handleResize);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
componentDidUpdate(prevProps, prevState) {
|
||||||
|
if (this.state.searchTerm !== prevState.searchTerm) {
|
||||||
|
this.resize();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
handleResize() {
|
handleResize() {
|
||||||
this.setState({
|
this.setState({
|
||||||
windowWidth: Utils.windowWidth(),
|
windowWidth: Utils.windowWidth(),
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user