Skip to content

Commit 9fdca35

Browse files
author
vikasrohit
authored
Merge pull request #565 from appirio-tech/feature/project_page_scroll_position
Github issue #552, Project listing: return user to previous spot in listing after back from project
2 parents fe7b399 + 8dbfb86 commit 9fdca35

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/projects/list/components/Projects/Projects.jsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ class Projects extends Component {
1515
}
1616

1717
componentDidUpdate() {
18-
window.scrollTo(0, parseInt(window.sessionStorage.getItem("projectsPageScrollTop")));
18+
window.scrollTo(0, parseInt(window.sessionStorage.getItem("projectsPageScrollTop")));
1919
}
2020

2121
componentWillUnmount(){
@@ -45,6 +45,7 @@ class Projects extends Component {
4545
}
4646

4747
onPageChange(pageNum) {
48+
window.sessionStorage.removeItem('projectsPageScrollTop');
4849
this.routeWithParams(this.props.criteria, pageNum)
4950
}
5051

0 commit comments

Comments
 (0)