Skip to content
Snippets Groups Projects
Commit d9059eb7 authored by esikkala's avatar esikkala
Browse files

Handle browser's back button in result table

parent 11f4de7d
No related branches found
No related tags found
No related merge requests found
......@@ -113,6 +113,13 @@ class ResultTable extends React.Component {
this.props.updatePage(this.props.resultClass, 0);
}
}
// handle browser's back button
const locationChanged = this.props.routeProps.location !== prevProps.routeProps.location;
if (locationChanged) {
const qs = this.props.routeProps.location.search.replace('?', '');
const newPage = parseInt(querystring.parse(qs).page);
this.props.updatePage(this.props.resultClass, newPage);
}
}
fetchResults = () => {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment