Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

User search pagination fixed #227

Merged
merged 2 commits into from
Jan 29, 2019
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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