diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-05-07 03:11:11 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-05-07 03:11:11 +0300 |
commit | d4f8f25db649b973f1ae344cb0f8a407862d106b (patch) | |
tree | f71f2d2243dc768a1ec44e79556d8020bff51dc7 /app/assets/javascripts/vue_shared/mixins | |
parent | 5f0e3773e9695fd0c9e92ea9180c8a1f5cfaa5c5 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets/javascripts/vue_shared/mixins')
-rw-r--r-- | app/assets/javascripts/vue_shared/mixins/ci_pagination_api_mixin.js | 24 |
1 files changed, 22 insertions, 2 deletions
diff --git a/app/assets/javascripts/vue_shared/mixins/ci_pagination_api_mixin.js b/app/assets/javascripts/vue_shared/mixins/ci_pagination_api_mixin.js index f9e3f3df0cc..69e9839380f 100644 --- a/app/assets/javascripts/vue_shared/mixins/ci_pagination_api_mixin.js +++ b/app/assets/javascripts/vue_shared/mixins/ci_pagination_api_mixin.js @@ -9,21 +9,41 @@ import { historyPushState, buildUrlWithCurrentLocation } from '../../lib/utils/c export default { methods: { onChangeTab(scope) { - this.updateContent({ scope, page: '1' }); + let params = { + scope, + page: '1', + }; + + params = this.onChangeWithFilter(params); + + this.updateContent(params); }, onChangePage(page) { /* URLS parameters are strings, we need to parse to match types */ - const params = { + let params = { page: Number(page).toString(), }; if (this.scope) { params.scope = this.scope; } + + params = this.onChangeWithFilter(params); + this.updateContent(params); }, + onChangeWithFilter(params) { + const { username } = this.requestData; + + if (username) { + return { ...params, username }; + } + + return params; + }, + updateInternalState(parameters) { // stop polling this.poll.stop(); |