Created
February 7, 2022 08:57
-
-
Save jinnyMcKindy/c4a84dacda9e376d5dc396a6450f4c18 to your computer and use it in GitHub Desktop.
paginate.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
protected async paginate({ | |
page, | |
itemsPerPage, | |
}: { | |
page: number; | |
itemsPerPage: number; | |
}): Promise<void> { | |
await this.$apollo.queries.list.refetch({ | |
...this.fetchListVariables, //параметры фильтров | |
page, | |
first: | |
itemsPerPage === -1 ? this.list?.paginatorInfo?.total : itemsPerPage, | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment