Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app/assets/javascripts/releases/components/releases_pagination_rest.vue')
-rw-r--r--app/assets/javascripts/releases/components/releases_pagination_rest.vue24
1 files changed, 24 insertions, 0 deletions
diff --git a/app/assets/javascripts/releases/components/releases_pagination_rest.vue b/app/assets/javascripts/releases/components/releases_pagination_rest.vue
new file mode 100644
index 00000000000..992cc4cd469
--- /dev/null
+++ b/app/assets/javascripts/releases/components/releases_pagination_rest.vue
@@ -0,0 +1,24 @@
+<script>
+import { mapActions, mapState } from 'vuex';
+import TablePagination from '~/vue_shared/components/pagination/table_pagination.vue';
+import { historyPushState, buildUrlWithCurrentLocation } from '~/lib/utils/common_utils';
+
+export default {
+ name: 'ReleasesPaginationRest',
+ components: { TablePagination },
+ computed: {
+ ...mapState('list', ['pageInfo']),
+ },
+ methods: {
+ ...mapActions('list', ['fetchReleasesRest']),
+ onChangePage(page) {
+ historyPushState(buildUrlWithCurrentLocation(`?page=${page}`));
+ this.fetchReleasesRest({ page });
+ },
+ },
+};
+</script>
+
+<template>
+ <table-pagination :change="onChangePage" :page-info="pageInfo" />
+</template>