diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-07-21 03:09:37 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-07-21 03:09:37 +0300 |
commit | 339a04aba21a61487ea800b018868598c041e90c (patch) | |
tree | 4e3bc96b23f8b9f457ce96d3aa5c837268177414 /app/assets/javascripts/ref | |
parent | 192bc8bd3109f30e957bf30a0139ae27fefd7936 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets/javascripts/ref')
-rw-r--r-- | app/assets/javascripts/ref/components/ref_selector.vue | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/app/assets/javascripts/ref/components/ref_selector.vue b/app/assets/javascripts/ref/components/ref_selector.vue index 012a391a3da..fcba1c00c89 100644 --- a/app/assets/javascripts/ref/components/ref_selector.vue +++ b/app/assets/javascripts/ref/components/ref_selector.vue @@ -74,6 +74,18 @@ export default { return !this.showBranchesSection && !this.showTagsSection && !this.showCommitsSection; }, }, + watch: { + // Keep the Vuex store synchronized if the parent + // component updates the selected ref through v-model + value: { + immediate: true, + handler() { + if (this.value !== this.selectedRef) { + this.setSelectedRef(this.value); + } + }, + }, + }, created() { this.setProjectId(this.projectId); this.search(this.query); |