add 'tag' as search suggestion
This commit is contained in:
parent
0ff6364a40
commit
6ba6ba26f3
3 changed files with 13 additions and 1 deletions
8
dist/bundle.es.js
vendored
8
dist/bundle.es.js
vendored
|
@ -629,7 +629,8 @@ var transaction_types = /*#__PURE__*/Object.freeze({
|
|||
const SEARCH_TYPES = {
|
||||
FILE: 'file',
|
||||
CHANNEL: 'channel',
|
||||
SEARCH: 'search'
|
||||
SEARCH: 'search',
|
||||
TAG: 'tag'
|
||||
};
|
||||
|
||||
const SEARCH_OPTIONS = {
|
||||
|
@ -1138,6 +1139,11 @@ const selectSearchSuggestions = reselect.createSelector(selectSearchValue, selec
|
|||
});
|
||||
}
|
||||
|
||||
searchSuggestions.push({
|
||||
value: query,
|
||||
type: SEARCH_TYPES.TAG
|
||||
});
|
||||
|
||||
const apiSuggestions = suggestions[query] || [];
|
||||
if (apiSuggestions.length) {
|
||||
searchSuggestions = searchSuggestions.concat(apiSuggestions.filter(suggestion => suggestion !== query).map(suggestion => {
|
||||
|
|
|
@ -2,6 +2,7 @@ export const SEARCH_TYPES = {
|
|||
FILE: 'file',
|
||||
CHANNEL: 'channel',
|
||||
SEARCH: 'search',
|
||||
TAG: 'tag',
|
||||
};
|
||||
|
||||
export const SEARCH_OPTIONS = {
|
||||
|
|
|
@ -96,6 +96,11 @@ export const selectSearchSuggestions: Array<SearchSuggestion> = createSelector(
|
|||
});
|
||||
}
|
||||
|
||||
searchSuggestions.push({
|
||||
value: query,
|
||||
type: SEARCH_TYPES.TAG,
|
||||
});
|
||||
|
||||
const apiSuggestions = suggestions[query] || [];
|
||||
if (apiSuggestions.length) {
|
||||
searchSuggestions = searchSuggestions.concat(
|
||||
|
|
Loading…
Reference in a new issue