Describe the bug
When setting the inputType prop to search on the searchbar component, the openAutocompleteOnFocus the autocomplete field is not opened when the input field receives focus.
To Reproduce
Steps to reproduce the behavior:
Place the searchbar somewhere in your template with the following props:
Go to your store, put your cursor inside the input field so it receives focus
Autocomplete is not expanded
Expected behavior
The autocomplete should be expanded showing top searches and search history
Screenshots
Desktop (please complete the following information):
all
Smartphone (please complete the following information):
all devices
Additional context
The reason why this issue exists:
Input props are being generated by the downshift helper and passed to the AutoCompleteInput component here
The props are not individually extracted but are destructured into the restProps prop. This is being sent to the InputSearch component coming from the styleguide here
Describe the bug When setting the
inputType
prop tosearch
on thesearchbar
component, theopenAutocompleteOnFocus
the autocomplete field is not opened when the input field receives focus.To Reproduce Steps to reproduce the behavior:
Expected behavior The autocomplete should be expanded showing
top searches
andsearch history
Screenshots
Desktop (please complete the following information):
Smartphone (please complete the following information):
Additional context The reason why this issue exists:
AutoCompleteInput
component hererestProps
prop. This is being sent to theInputSearch
component coming from the styleguide hereInputSearch
does not handle any focus events other then it's own. There is no callback on theonFocus
event. https://github.com/vtex/styleguide/blob/master/react/components/InputSearch/index.js#L58minor untidy issue
autoCompleteOnFocus
is unused