diff options
Diffstat (limited to 'app/assets/javascripts/runner/components/runner_filtered_search_bar.vue')
-rw-r--r-- | app/assets/javascripts/runner/components/runner_filtered_search_bar.vue | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/app/assets/javascripts/runner/components/runner_filtered_search_bar.vue b/app/assets/javascripts/runner/components/runner_filtered_search_bar.vue index f0f8bbdf5df..bff5ec9b238 100644 --- a/app/assets/javascripts/runner/components/runner_filtered_search_bar.vue +++ b/app/assets/javascripts/runner/components/runner_filtered_search_bar.vue @@ -45,7 +45,7 @@ export default { }, }, data() { - // filtered_search_bar_root.vue may mutate the inital + // filtered_search_bar_root.vue may mutate the initial // filters. Use `cloneDeep` to prevent those mutations // from affecting this component const { filters, sort } = cloneDeep(this.value); @@ -54,6 +54,14 @@ export default { initialSortBy: sort, }; }, + computed: { + validTokens() { + // Some filters are only available in EE + // EE-only tokens are represented by `null` or `undefined` + // values when in CE + return this.tokens.filter(Boolean); + }, + }, methods: { onFilter(filters) { // Apply new filters, from page 1 @@ -83,7 +91,7 @@ export default { recent-searches-storage-key="runners-search" :sort-options="$options.sortOptions" :initial-filter-value="initialFilterValue" - :tokens="tokens" + :tokens="validTokens" :initial-sort-by="initialSortBy" :search-input-placeholder="__('Search or filter results...')" data-testid="runners-filtered-search" |