vtex-apps / store-components

Default VTEX store components
51 stars 142 forks source link

[SearchBar] Autocomplete not opening on focus with inputType search #1074

Open bgoyarts opened 1 year ago

bgoyarts commented 1 year ago

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:

  1. Place the searchbar somewhere in your template with the following props:
    {
    "props": {
    "openAutocompleteOnFocus": true,
    "inputType": "search"
    }
    }
  2. Go to your store, put your cursor inside the input field so it receives focus
  3. Autocomplete is not expanded

Expected behavior The autocomplete should be expanded showing top searches and search history

Screenshots search-focus

Desktop (please complete the following information):

Smartphone (please complete the following information):

Additional context The reason why this issue exists:

minor untidy issue