Can FilterSearch allow non-autocomplete entries?

When typing in the FilterSearch input is it possible to make it so that pressing enter will execute a search, rather than selecting one of the autocomplete options?

For example, on this site https://www.pfchangs.com/locations/search.html if I type “arlington” into the search bar and hit enter, it does a search using just the typed “arlington” query (which ends up being Arlington, TX).

With the FilterSearch component, if I hit enter it selects the first autocomplete option since the position of the user is automatically moved into the autocomplete element rather than staying in the search box. This behavior occurs regardless of using the onSelect param. Example - on this site https://master-worldly–visible–grubworm-pgsdemo-com.preview.pagescdn.com/locator if I type “arlington” and hit enter, it automatically selects “Arlington, Virginia, United States” from the dropdown and searches for it, rather than using “arlington”

Hi @Michael_Woon1 - unfortunately that is not possible with the filter search component. The filter search component returns candidate filters to apply to the search, rather than working like a normal search bar, where you can type anything.

If you have more details on your use case that you would like to share as to why filter search should work in the way you described above, that would be a great post for Ideas!

1 Like