Skip to content

How to zero "initialState" and not to show any initial results on example home page? #1026

Answered by FuadEfendi
FuadEfendi asked this question in Q&A
Discussion options

You must be logged in to vote

I think I found an answer,

var search = instantsearch({
  searchFunction(helper) {
    if (helper.state.query === '') {
      return;
    }
    helper.search();
  }

https://www.algolia.com/doc/api-reference/widgets/instantsearch/js/#widget-param-searchfunction

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by FuadEfendi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant