React-InstantSearch w/ Autosuggest - unwanted initial hit results displaying

Hi, I am getting an unwanted behavior in my search only on the initial page load when a user types the first input value.

unwanted behavior: displays the initial results from the hits from the page load when the first input value is entered for a split second then displays the appropriate hits that match the input value (this only happens on the initial page load or if the user refreshes the page).

Any suggestions on how to prevent the behavior from occurring would be very appreciated :smile:

code example:

react-autosuggest reference:

Hi @mmojica,

I’ll need to investigate a bit more to classify this either as a bug that can be easily fix regarding our current architecture or if it would require a new feature like skipping the first query. You can have a look also at this thread where I talk about it: React Native empty initial search

In the meantime, I guess you could do a dirty hack like checking if the hits are still from the first query or not?

Thanks @marielaure.thuret! We ended up adding a condition that checks the hits and query value that worked. Will definitely take a look into the createConnector to skip the first query.