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'
export const searchUsers = gql`
query ($searchText: String!, $currentPage: Int, $notActivated: Boolean) {
searchUsers(searchText: $searchText, currentPage: $currentPage, notActivated: $notActivated) {
query ($searchText: String!, $currentPage: Int, $pageSize: Int, $notActivated: Boolean) {
searchUsers(
searchText: $searchText
currentPage: $currentPage
pageSize: $pageSize
notActivated: $notActivated
) {
userCount
userList {
userId

View File

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

View File

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