diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-11-19 11:27:35 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-11-19 11:27:35 +0300 |
commit | 7e9c479f7de77702622631cff2628a9c8dcbc627 (patch) | |
tree | c8f718a08e110ad7e1894510980d2155a6549197 /app/assets/javascripts/vue_shared/components/filtered_search_bar | |
parent | e852b0ae16db4052c1c567d9efa4facc81146e88 (diff) |
Add latest changes from gitlab-org/gitlab@13-6-stable-eev13.6.0-rc42
Diffstat (limited to 'app/assets/javascripts/vue_shared/components/filtered_search_bar')
2 files changed, 25 insertions, 1 deletions
diff --git a/app/assets/javascripts/vue_shared/components/filtered_search_bar/filtered_search_bar_root.vue b/app/assets/javascripts/vue_shared/components/filtered_search_bar/filtered_search_bar_root.vue index 25478ad6f4f..97b4ceda033 100644 --- a/app/assets/javascripts/vue_shared/components/filtered_search_bar/filtered_search_bar_root.vue +++ b/app/assets/javascripts/vue_shared/components/filtered_search_bar/filtered_search_bar_root.vue @@ -5,6 +5,7 @@ import { GlButton, GlDropdown, GlDropdownItem, + GlFormCheckbox, GlTooltipDirective, } from '@gitlab/ui'; @@ -25,6 +26,7 @@ export default { GlButton, GlDropdown, GlDropdownItem, + GlFormCheckbox, }, directives: { GlTooltip: GlTooltipDirective, @@ -59,10 +61,25 @@ export default { default: '', validator: value => value === '' || /(_desc)|(_asc)/g.test(value), }, + showCheckbox: { + type: Boolean, + required: false, + default: false, + }, + checkboxChecked: { + type: Boolean, + required: false, + default: false, + }, searchInputPlaceholder: { type: String, required: true, }, + suggestionsListClass: { + type: String, + required: false, + default: '', + }, }, data() { let selectedSortOption = this.sortOptions[0]?.sortDirection?.descending; @@ -291,12 +308,19 @@ export default { <template> <div class="vue-filtered-search-bar-container d-md-flex"> + <gl-form-checkbox + v-if="showCheckbox" + class="gl-align-self-center" + :checked="checkboxChecked" + @input="$emit('checked-input', $event)" + /> <gl-filtered-search ref="filteredSearchInput" v-model="filterValue" :placeholder="searchInputPlaceholder" :available-tokens="tokens" :history-items="filteredRecentSearches" + :suggestions-list-class="suggestionsListClass" class="flex-grow-1" @history-item-selected="handleHistoryItemSelected" @clear-history="handleClearHistory" diff --git a/app/assets/javascripts/vue_shared/components/filtered_search_bar/tokens/milestone_token.vue b/app/assets/javascripts/vue_shared/components/filtered_search_bar/tokens/milestone_token.vue index 89952623d0d..c24df5e081d 100644 --- a/app/assets/javascripts/vue_shared/components/filtered_search_bar/tokens/milestone_token.vue +++ b/app/assets/javascripts/vue_shared/components/filtered_search_bar/tokens/milestone_token.vue @@ -65,7 +65,7 @@ export default { .then(({ data }) => { this.milestones = data; }) - .catch(() => createFlash(__('There was a problem fetching milestones.'))) + .catch(() => createFlash({ message: __('There was a problem fetching milestones.') })) .finally(() => { this.loading = false; }); |