diff options
-rw-r--r-- | app/assets/javascripts/vue_pipelines_index/pipelines.js.es6 | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/app/assets/javascripts/vue_pipelines_index/pipelines.js.es6 b/app/assets/javascripts/vue_pipelines_index/pipelines.js.es6 index 9e816a285e4..39935b08dc0 100644 --- a/app/assets/javascripts/vue_pipelines_index/pipelines.js.es6 +++ b/app/assets/javascripts/vue_pipelines_index/pipelines.js.es6 @@ -35,8 +35,16 @@ require('../vue_shared/components/pipelines_table'); this.store.fetchDataLoop.call(this, Vue, this.pagenum, this.scope, this.apiScope); }, methods: { - change(pagenum, apiScope) { - if (!apiScope) apiScope = 'all'; + + /** + * Changes the URL according to the pagination component. + * + * If no scope is provided, 'all' is assumed. + * + * @param {Number} pagenum + * @param {String} apiScope = 'all' + */ + change(pagenum, apiScope = 'all') { gl.utils.visitUrl(`?scope=${apiScope}&p=${pagenum}`); }, }, |