diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-03-04 09:08:20 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-03-04 09:08:20 +0000 |
commit | d80f3cd75e700b6e62910865bfd36734644ffa89 (patch) | |
tree | aa2fa2f2b4385854c13591bef8e74924ef661657 /app/assets/javascripts/filtered_search | |
parent | be81c1578d65f25edfde8aa550f190b8d3e6d976 (diff) | |
download | gitlab-ce-d80f3cd75e700b6e62910865bfd36734644ffa89.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets/javascripts/filtered_search')
-rw-r--r-- | app/assets/javascripts/filtered_search/filtered_search_manager.js | 27 |
1 files changed, 0 insertions, 27 deletions
diff --git a/app/assets/javascripts/filtered_search/filtered_search_manager.js b/app/assets/javascripts/filtered_search/filtered_search_manager.js index e9a714605c7..88737396113 100644 --- a/app/assets/javascripts/filtered_search/filtered_search_manager.js +++ b/app/assets/javascripts/filtered_search/filtered_search_manager.js @@ -472,33 +472,6 @@ export default class FilteredSearchManager { }); input.value = input.value.replace(`${tokenKey}:`, ''); } - - const splitSearchToken = searchToken && searchToken.split(' '); - let lastSearchToken = _.last(splitSearchToken); - lastSearchToken = lastSearchToken?.toLowerCase(); - - /** - * If user writes "milestone", a known token, in the input, we should not - * wait for leading colon to flush it as a filter token. - */ - if (this.filteredSearchTokenKeys.getKeys().includes(lastSearchToken)) { - if (splitSearchToken.length > 1) { - splitSearchToken.pop(); - const searchVisualTokens = splitSearchToken.join(' '); - - input.value = input.value.replace(searchVisualTokens, ''); - FilteredSearchVisualTokens.addSearchVisualToken(searchVisualTokens); - } - FilteredSearchVisualTokens.addFilterVisualToken(lastSearchToken, null, null, { - uppercaseTokenName: this.filteredSearchTokenKeys.shouldUppercaseTokenName( - lastSearchToken, - ), - capitalizeTokenValue: this.filteredSearchTokenKeys.shouldCapitalizeTokenValue( - lastSearchToken, - ), - }); - input.value = input.value.replace(lastSearchToken, ''); - } } else if (!isLastVisualTokenValid && !FilteredSearchVisualTokens.getLastTokenOperator()) { const tokenKey = FilteredSearchVisualTokens.getLastTokenPartial(); const tokenOperator = searchToken && searchToken.trim(); |