perPage as data parameter

This commit is contained in:
Moriz Wahl 2022-01-18 12:51:59 +01:00
parent 9b87b26fa2
commit ddd9e4ecc0
3 changed files with 13 additions and 4 deletions

View File

@ -1,8 +1,13 @@
import gql from 'graphql-tag' import gql from 'graphql-tag'
export const searchUsers = gql` export const searchUsers = gql`
query ($searchText: String!, $currentPage: Int, $notActivated: Boolean) { query ($searchText: String!, $currentPage: Int, $pageSize: Int, $notActivated: Boolean) {
searchUsers(searchText: $searchText, currentPage: $currentPage, notActivated: $notActivated) { searchUsers(
searchText: $searchText
currentPage: $currentPage
pageSize: $pageSize
notActivated: $notActivated
) {
userCount userCount
userList { userList {
userId userId

View File

@ -21,7 +21,7 @@
<b-pagination <b-pagination
pills pills
v-model="currentPage" v-model="currentPage"
per-page="25" per-page="perPage"
:total-rows="rows" :total-rows="rows"
align="center" align="center"
></b-pagination> ></b-pagination>
@ -110,6 +110,7 @@ export default {
creation: [null, null, null], creation: [null, null, null],
rows: 0, rows: 0,
currentPage: 1, currentPage: 1,
perPage: 25,
} }
}, },
async created() { async created() {
@ -123,6 +124,7 @@ export default {
variables: { variables: {
searchText: this.criteria, searchText: this.criteria,
currentPage: this.currentPage, currentPage: this.currentPage,
pageSize: this.perPage,
}, },
}) })
.then((result) => { .then((result) => {

View File

@ -25,7 +25,7 @@
pills pills
size="lg" size="lg"
v-model="currentPage" v-model="currentPage"
per-page="25" per-page="perPage"
:total-rows="rows" :total-rows="rows"
align="center" align="center"
></b-pagination> ></b-pagination>
@ -78,6 +78,7 @@ export default {
filterCheckedEmails: false, filterCheckedEmails: false,
rows: 0, rows: 0,
currentPage: 1, currentPage: 1,
perPage: 25,
} }
}, },
methods: { methods: {
@ -92,6 +93,7 @@ export default {
variables: { variables: {
searchText: this.criteria, searchText: this.criteria,
currentPage: this.currentPage, currentPage: this.currentPage,
pageSize: this.perPage,
notActivated: this.filterCheckedEmails, notActivated: this.filterCheckedEmails,
}, },
}) })