diff --git a/frontend/src/components/task/task-table.js b/frontend/src/components/task/task-table.js index 5b3844197..d4b85c73d 100644 --- a/frontend/src/components/task/task-table.js +++ b/frontend/src/components/task/task-table.js @@ -163,6 +163,7 @@ class CustomPaginationActionsTable extends React.Component { handleChangePage = (event, page) => { this.setState({ page }) + this.props.history.replace('/profile/tasks/' + page) }; handleChangeRowsPerPage = event => { @@ -172,6 +173,12 @@ class CustomPaginationActionsTable extends React.Component { handleClickListItem = id => { this.props.history.push('/task/' + id) } + + componentDidMount() { + const path = window.location.pathname.split("/"); + const index = path.indexOf("tasks") + 1; + this.setState({ page: parseInt(path[index]) }); + } render () { const { classes, tasks } = this.props