diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-06-14 18:09:48 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-06-14 18:09:48 +0300 |
commit | 81f257d72ef398933453d215019c850f57dae252 (patch) | |
tree | e7236ae76f96afb207d3ea85164b88c429b6f43c /app/assets/javascripts/sidebar/components/sidebar_dropdown_widget.vue | |
parent | b82c4935ecc86d1429710163287f5bd7d75bf226 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets/javascripts/sidebar/components/sidebar_dropdown_widget.vue')
-rw-r--r-- | app/assets/javascripts/sidebar/components/sidebar_dropdown_widget.vue | 40 |
1 files changed, 28 insertions, 12 deletions
diff --git a/app/assets/javascripts/sidebar/components/sidebar_dropdown_widget.vue b/app/assets/javascripts/sidebar/components/sidebar_dropdown_widget.vue index 277e1400bf2..c80ccc928b3 100644 --- a/app/assets/javascripts/sidebar/components/sidebar_dropdown_widget.vue +++ b/app/assets/javascripts/sidebar/components/sidebar_dropdown_widget.vue @@ -293,9 +293,17 @@ export default { <span v-else-if="!currentAttribute" class="gl-text-gray-500"> {{ $options.i18n.none }} </span> - <gl-link v-else class="gl-text-gray-900! gl-font-weight-bold" :href="attributeUrl"> - {{ attributeTitle }} - </gl-link> + <slot + v-else + name="value" + :attributeTitle="attributeTitle" + :attributeUrl="attributeUrl" + :currentAttribute="currentAttribute" + > + <gl-link class="gl-text-gray-900! gl-font-weight-bold" :href="attributeUrl"> + {{ attributeTitle }} + </gl-link> + </slot> </div> </template> <template #default> @@ -327,16 +335,24 @@ export default { <gl-dropdown-text v-if="emptyPropsList"> {{ i18n.noAttributesFound }} </gl-dropdown-text> - <gl-dropdown-item - v-for="attrItem in attributesList" - :key="attrItem.id" - :is-check-item="true" - :is-checked="isAttributeChecked(attrItem.id)" - :data-testid="`${issuableAttribute}-items`" - @click="updateAttribute(attrItem.id)" + <slot + v-else + name="list" + :attributesList="attributesList" + :isAttributeChecked="isAttributeChecked" + :updateAttribute="updateAttribute" > - {{ attrItem.title }} - </gl-dropdown-item> + <gl-dropdown-item + v-for="attrItem in attributesList" + :key="attrItem.id" + :is-check-item="true" + :is-checked="isAttributeChecked(attrItem.id)" + :data-testid="`${issuableAttribute}-items`" + @click="updateAttribute(attrItem.id)" + > + {{ attrItem.title }} + </gl-dropdown-item> + </slot> </template> </gl-dropdown> </template> |