Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-docs.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSuzanne Selhorn <sselhorn@gitlab.com>2023-03-08 01:45:52 +0300
committerSuzanne Selhorn <sselhorn@gitlab.com>2023-03-08 01:45:52 +0300
commitb2709656761c5a130040c1e448506b9356d8287c (patch)
tree73e48d8ef72f431c102faedae0426bbc289d0b6a
parent384964f7d2366f24f77eacd30f1fd814a5ab3a26 (diff)
parent8591164f156278065f06a4f42030e53346648927 (diff)
Merge branch 'gps-filter-persist' into 'main'
Persist search filter option after initial query See merge request https://gitlab.com/gitlab-org/gitlab-docs/-/merge_requests/3630 Merged-by: Suzanne Selhorn <sselhorn@gitlab.com> Co-authored-by: Sarah German <sgerman@gitlab.com>
-rw-r--r--content/frontend/search/components/google_results.vue8
1 files changed, 6 insertions, 2 deletions
diff --git a/content/frontend/search/components/google_results.vue b/content/frontend/search/components/google_results.vue
index cc078674..5d2f1803 100644
--- a/content/frontend/search/components/google_results.vue
+++ b/content/frontend/search/components/google_results.vue
@@ -101,7 +101,7 @@ export default {
this.loading = false;
throw new Error(`Error code ${error.code}: ${error.message}`);
},
- async search(query, filters = []) {
+ async search(query, filters) {
this.results = [];
if (!query) return;
@@ -137,7 +137,11 @@ export default {
<div class="google-search gl-mb-9">
<h1>Search</h1>
<div class="gl-h-11 gl-mb-5">
- <gl-search-box-by-click v-model="query" :value="query" @submit="search(query)" />
+ <gl-search-box-by-click
+ v-model="query"
+ :value="query"
+ @submit="search(query, activeFilters)"
+ />
<div v-if="results.length" class="gl-font-sm gl-mb-5 gl-ml-1">
{{ resultSummary }}
</div>