diff options
author | Adriel Santiago <adriel@gitlab.com> | 2018-08-20 14:27:57 -0400 |
---|---|---|
committer | Adriel Santiago <adriel@gitlab.com> | 2018-08-20 14:27:57 -0400 |
commit | 1272bb0547da5a1a3b64d78e21b8a0a381420f32 (patch) | |
tree | 3c72210ae77fe6bc0ab8f0927c34762bda178443 /app/assets | |
parent | d3c574d8f96559b2c7508ab67fdc64a891d3890f (diff) | |
download | gitlab-ce-use-gitlab-ui-pagination-for-groups.tar.gz |
updated groups pagination to use newest gitlab-ui iterationuse-gitlab-ui-pagination-for-groups
Diffstat (limited to 'app/assets')
-rw-r--r-- | app/assets/javascripts/groups/components/groups.vue | 25 |
1 files changed, 1 insertions, 24 deletions
diff --git a/app/assets/javascripts/groups/components/groups.vue b/app/assets/javascripts/groups/components/groups.vue index 4523eafb9cc..ef1bad43d95 100644 --- a/app/assets/javascripts/groups/components/groups.vue +++ b/app/assets/javascripts/groups/components/groups.vue @@ -1,6 +1,5 @@ <script> import { mergeUrlParams } from '~/lib/utils/url_utility'; -import bp from '../../breakpoints'; import { s__ } from '../../locale'; export default { @@ -23,7 +22,6 @@ export default { }, }, data: () => ({ - breakpoint: bp.getBreakpointSize(), paginationText: { first: s__('Pagination|« First'), prev: s__('Pagination|Prev'), @@ -31,31 +29,11 @@ export default { last: s__('Pagination|Last »'), }, }), - computed: { - paginationLimit() { - switch (this.breakpoint) { - case 'xs': - return 1; - case 'sm': - return 5; - default: - return 11; - } - }, - }, - created() { - window.addEventListener('resize', this.setBreakpoint); - }, - beforeDestroy() { - window.removeEventListener('resize', this.setBreakpoint); - }, + methods: { change(page) { return mergeUrlParams({ page }, window.location.href); }, - setBreakpoint() { - this.breakpoint = bp.getBreakpointSize(); - }, }, }; </script> @@ -74,7 +52,6 @@ export default { /> <gl-pagination v-if="!searchEmpty && pageInfo.totalPages > 1" - :limit="paginationLimit" :link-gen="change" :value="pageInfo.page" :number-of-pages="pageInfo.totalPages" |