diff --git a/packages/web/src/components/search/SearchBox.js b/packages/web/src/components/search/SearchBox.js index 4ea1e86b60..e021eab2f9 100644 --- a/packages/web/src/components/search/SearchBox.js +++ b/packages/web/src/components/search/SearchBox.js @@ -539,6 +539,15 @@ const SearchBox = (props) => { const func = new Function(`return ${suggestion.subAction}`)(); func(suggestion, currentValue, customEvents); } + if (suggestion.action === featuredSuggestionsActionTypes.SELECT) { + setValue( + suggestion.value, + true, + props, + isTagsMode.current ? causes.SUGGESTION_SELECT : causes.ENTER_PRESS, + ); + onValueSelected(suggestion.value, causes.SUGGESTION_SELECT); + } // blur is important to close the dropdown // on selecting one of featured suggestions // else Downshift probably is focusing the dropdown @@ -1767,14 +1776,13 @@ const ForwardRefComponent = React.forwardRef((props, ref) => ( componentType={componentTypes.searchBox} mode={preferenceProps.testMode ? 'test' : ''} > - { - componentProps => - () - } + {componentProps => ( + + )} )}