summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdriel Santiago <adriel@gitlab.com>2018-08-20 14:27:57 -0400
committerAdriel Santiago <adriel@gitlab.com>2018-08-20 14:27:57 -0400
commit1272bb0547da5a1a3b64d78e21b8a0a381420f32 (patch)
tree3c72210ae77fe6bc0ab8f0927c34762bda178443
parentd3c574d8f96559b2c7508ab67fdc64a891d3890f (diff)
downloadgitlab-ce-use-gitlab-ui-pagination-for-groups.tar.gz
updated groups pagination to use newest gitlab-ui iterationuse-gitlab-ui-pagination-for-groups
-rw-r--r--app/assets/javascripts/groups/components/groups.vue25
-rw-r--r--package.json2
-rw-r--r--yarn.lock4
3 files changed, 4 insertions, 27 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"
diff --git a/package.json b/package.json
index 4e8f5810c22..ff9669bc276 100644
--- a/package.json
+++ b/package.json
@@ -19,7 +19,7 @@
},
"dependencies": {
"@gitlab-org/gitlab-svgs": "^1.27.0",
- "@gitlab-org/gitlab-ui": "https://gitlab.com/gitlab-org/gitlab-ui/-/jobs/90460515/artifacts/raw/gitlab-ui.27-add-bootstrap-vue-s-pagination.tgz",
+ "@gitlab-org/gitlab-ui": "https://gitlab.com/gitlab-org/gitlab-ui/-/jobs/90684747/artifacts/raw/gitlab-ui.27-add-bootstrap-vue-s-pagination.tgz",
"autosize": "^4.0.0",
"axios": "^0.17.1",
"babel-core": "^6.26.3",
diff --git a/yarn.lock b/yarn.lock
index 58376896a5e..f8d35d0c895 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -82,9 +82,9 @@
version "1.27.0"
resolved "https://registry.yarnpkg.com/@gitlab-org/gitlab-svgs/-/gitlab-svgs-1.27.0.tgz#638e70399ebd59e503732177316bb9a18bf7a13f"
-"@gitlab-org/gitlab-ui@https://gitlab.com/gitlab-org/gitlab-ui/-/jobs/90175964/artifacts/raw/gitlab-ui.27-add-bootstrap-vue-s-pagination.tgz":
+"@gitlab-org/gitlab-ui@https://gitlab.com/gitlab-org/gitlab-ui/-/jobs/90684747/artifacts/raw/gitlab-ui.27-add-bootstrap-vue-s-pagination.tgz":
version "1.0.5"
- resolved "https://gitlab.com/gitlab-org/gitlab-ui/-/jobs/90175964/artifacts/raw/gitlab-ui.27-add-bootstrap-vue-s-pagination.tgz#2958d909ae2ed5af32d1c9e9bd29e676164ccf03"
+ resolved "https://gitlab.com/gitlab-org/gitlab-ui/-/jobs/90684747/artifacts/raw/gitlab-ui.27-add-bootstrap-vue-s-pagination.tgz#5eff8bfa5cfeb19c2588839365166dff6f3b64e9"
dependencies:
"@gitlab-org/gitlab-svgs" "^1.23.0"
bootstrap-vue "^2.0.0-rc.11"