Skip to content

Instantly share code, notes, and snippets.

@jinnyMcKindy
Created February 7, 2022 08:57
Show Gist options
  • Save jinnyMcKindy/c4a84dacda9e376d5dc396a6450f4c18 to your computer and use it in GitHub Desktop.
Save jinnyMcKindy/c4a84dacda9e376d5dc396a6450f4c18 to your computer and use it in GitHub Desktop.
paginate.js
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