diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-04-23 15:09:52 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-04-23 15:09:52 +0300 |
commit | ecf1ffc19875a94c9de675b0559adc408b202515 (patch) | |
tree | 92f76d0b7cbd9161eb4dff35ca4753f45f4bc6d2 /app/assets/javascripts/members | |
parent | 65f7976d0cd11d91a4c0945b2c63a1aa2f888b07 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets/javascripts/members')
-rw-r--r-- | app/assets/javascripts/members/components/filter_sort/members_filtered_search_bar.vue | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/app/assets/javascripts/members/components/filter_sort/members_filtered_search_bar.vue b/app/assets/javascripts/members/components/filter_sort/members_filtered_search_bar.vue index cc97d235a9c..b92d9211f91 100644 --- a/app/assets/javascripts/members/components/filter_sort/members_filtered_search_bar.vue +++ b/app/assets/javascripts/members/components/filter_sort/members_filtered_search_bar.vue @@ -1,8 +1,8 @@ <script> import { GlFilteredSearchToken } from '@gitlab/ui'; import { mapState } from 'vuex'; -import { getParameterByName } from '~/lib/utils/common_utils'; -import { setUrlParams, queryToObject } from '~/lib/utils/url_utility'; +import { getParameterByName, urlParamsToObject } from '~/lib/utils/common_utils'; +import { setUrlParams } from '~/lib/utils/url_utility'; import { s__ } from '~/locale'; import { SEARCH_TOKEN_TYPE, SORT_PARAM } from '~/members/constants'; import FilteredSearchBar from '~/vue_shared/components/filtered_search_bar/filtered_search_bar_root.vue'; @@ -63,7 +63,7 @@ export default { }, }, created() { - const query = queryToObject(window.location.search); + const query = urlParamsToObject(window.location.search); const tokens = this.tokens .filter((token) => query[token.type]) @@ -97,9 +97,12 @@ export default { if (type === SEARCH_TOKEN_TYPE) { if (value.data !== '') { + const { searchParam } = this.filteredSearchBar; + const { [searchParam]: searchParamValue } = accumulator; + return { ...accumulator, - [this.filteredSearchBar.searchParam]: value.data, + [searchParam]: searchParamValue ? `${searchParamValue} ${value.data}` : value.data, }; } } else { |