How to prevent clearing search field after page was loaded?

How to prevent clearing search field after page was loaded?


I have a div id=“headsearch-box”, until page not finished loading, customer can search, but after page loaded - the field is making empty. How to avoid it?
I haven’t found decision in the documentation.

Hi there, can you please create a reproducible examples using one of our templates? Thanks: https://instantsearch-templates.netlify.com

Can, but it’s long, and don’t think that can a reproduce the issue.
i have a devserv and using there instasearch v2. this js (upd: links removed)
algolia part starts from:
//for algolia search in the header

i just need to understand algolia has or not special functions for clearing search field when page loading finished (like ready function in jquery).

Hi @altair5555,

I understand that you don’t want your searchbox to be cleared when the page is loaded.

Are you using the Algolia InstantSearch searchbox or just an html form field?

A codesandbox example would really help, as @vvo suggested above, so that we could see the issue you are experiencing.

Hello @cindy.cullen @vvo i’m using Algolia InstantSearch searchbox
i have simple example, but how to reproduce an issue, I really don’t understand.

I’m just asking a team about main functionality inside algolia js, because, to catch handle, why the field makes empty, difficult.

Will try to do some example

Does anyone know the answer?