summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/ref/components/ref_selector.vue
diff options
context:
space:
mode:
Diffstat (limited to 'app/assets/javascripts/ref/components/ref_selector.vue')
-rw-r--r--app/assets/javascripts/ref/components/ref_selector.vue15
1 files changed, 15 insertions, 0 deletions
diff --git a/app/assets/javascripts/ref/components/ref_selector.vue b/app/assets/javascripts/ref/components/ref_selector.vue
index b75958e2ced..10967fb84ed 100644
--- a/app/assets/javascripts/ref/components/ref_selector.vue
+++ b/app/assets/javascripts/ref/components/ref_selector.vue
@@ -15,6 +15,8 @@ import {
REF_TYPE_BRANCHES,
REF_TYPE_TAGS,
REF_TYPE_COMMITS,
+ BRANCH_REF_TYPE,
+ TAG_REF_TYPE,
} from '../constants';
import createStore from '../stores';
import RefResultsSection from './ref_results_section.vue';
@@ -50,6 +52,11 @@ export default {
required: false,
default: '',
},
+ refType: {
+ type: String,
+ required: false,
+ default: null,
+ },
projectId: {
type: String,
required: true,
@@ -146,6 +153,12 @@ export default {
buttonText() {
return this.selectedRefForDisplay || this.i18n.noRefSelected;
},
+ isTagRefType() {
+ return this.refType === TAG_REF_TYPE;
+ },
+ isBranchRefType() {
+ return this.refType === BRANCH_REF_TYPE;
+ },
},
watch: {
// Keep the Vuex store synchronized if the parent
@@ -273,6 +286,7 @@ export default {
:show-header="showSectionHeaders"
data-testid="branches-section"
data-qa-selector="branches_section"
+ :should-show-check="!useSymbolicRefNames || isBranchRefType"
@selected="selectRef($event)"
/>
@@ -289,6 +303,7 @@ export default {
:error-message="i18n.tagsErrorMessage"
:show-header="showSectionHeaders"
data-testid="tags-section"
+ :should-show-check="!useSymbolicRefNames || isTagRefType"
@selected="selectRef($event)"
/>