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>2023-12-19 14:01:45 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2023-12-19 14:01:45 +0300
commit9297025d0b7ddf095eb618dfaaab2ff8f2018d8b (patch)
tree865198c01d1824a9b098127baa3ab980c9cd2c06 /app/assets/javascripts/ref
parent6372471f43ee03c05a7c1f8b0c6ac6b8a7431dbe (diff)
Add latest changes from gitlab-org/gitlab@16-7-stable-eev16.7.0-rc42
Diffstat (limited to 'app/assets/javascripts/ref')
-rw-r--r--app/assets/javascripts/ref/components/ref_selector.vue12
1 files changed, 11 insertions, 1 deletions
diff --git a/app/assets/javascripts/ref/components/ref_selector.vue b/app/assets/javascripts/ref/components/ref_selector.vue
index ed9fd521e67..0d6b19829f2 100644
--- a/app/assets/javascripts/ref/components/ref_selector.vue
+++ b/app/assets/javascripts/ref/components/ref_selector.vue
@@ -28,12 +28,17 @@ export default {
},
inheritAttrs: false,
props: {
+ disabled: {
+ type: Boolean,
+ required: false,
+ default: false,
+ },
enabledRefTypes: {
type: Array,
required: false,
default: () => ALL_REF_TYPES,
validator: (val) =>
- // It has to be an arrray
+ // It has to be an array
isArray(val) &&
// with at least one item
val.length > 0 &&
@@ -234,6 +239,10 @@ export default {
this.debouncedSearch();
},
selectRef(ref) {
+ if (this.disabled) {
+ return;
+ }
+
this.setSelectedRef(ref);
this.$emit('input', this.selectedRef);
},
@@ -262,6 +271,7 @@ export default {
:toggle-class="extendedToggleButtonClass"
:toggle-text="buttonText"
:icon="dropdownIcon"
+ :disabled="disabled"
v-bind="$attrs"
v-on="$listeners"
@hidden="$emit('hide')"