Skip to content

Commit

Permalink
user search pagination fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
Oleksandr Zarubin committed Sep 5, 2018
1 parent 556512c commit 21321f5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 3 additions & 1 deletion client/components/Users/UserOverview.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,9 @@ class UserOverview extends React.Component {
}

handleUsersPageChange(page) {
this.props.getUsersOnPage(page);
const query = this.props && this.props.fetchQuery;
const filter = this.state && this.state.selectedFilter && this.state.selectedFilter.filterBy;
this.props.getUsersOnPage(page, query, filter);
}

renderActions(user, index) {
Expand Down
4 changes: 2 additions & 2 deletions client/containers/Users.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ class Users extends React.Component {
this.props.fetchUsers('', '', true, process.env.PER_PAGE);
}

getUsersOnPage(page) {
this.props.fetchUsers('', '', true, process.env.PER_PAGE, page);
getUsersOnPage(page, query = '', field = '') {
this.props.fetchUsers(query, field, true, process.env.PER_PAGE, page);
}

render() {
Expand Down

0 comments on commit 21321f5

Please sign in to comment.