Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-07-21 03:09:37 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-07-21 03:09:37 +0300
commit339a04aba21a61487ea800b018868598c041e90c (patch)
tree4e3bc96b23f8b9f457ce96d3aa5c837268177414 /app/assets/javascripts/ref
parent192bc8bd3109f30e957bf30a0139ae27fefd7936 (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.vue12
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);