mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
Update scroll restoration logic in suspense fixture (#13437)
This commit is contained in:
committed by
Sophie Alpert
parent
d670bdc6b1
commit
3cae7543be
@@ -21,7 +21,7 @@ export default class App extends PureComponent {
|
||||
componentDidUpdate(prevProps, prevState) {
|
||||
if (
|
||||
prevState.showDetail !== this.state.showDetail ||
|
||||
prevState.currentId !== this.state.currentId
|
||||
(prevState.currentId !== this.state.currentId && this.state.showDetail)
|
||||
) {
|
||||
window.scrollTo(0, 0);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user