Skip to content

How to determine the operator used when reading the uiState for a refinement list #6505

Answered by dhayab
callmekatootie asked this question in Q&A
Discussion options

You must be logged in to vote

You can get all the search parameters sent to Algolia from the internal helper. If you need to perform a request in reaction to state change, you could set up a middleware like this:

const middleware = ({ instantSearchInstance }) => {
  const sendRequest = () => {
    const searchParameters = instantSearchInstance.mainIndex.getHelper()?.getQuery();
    // ...
  };

  return {
    subscribe: sendRequest,
    onStateChange: sendRequest,
  };
}

Replies: 1 comment 6 replies

Comment options

You must be logged in to vote
6 replies
@callmekatootie
Comment options

@dhayab
Comment options

Answer selected by callmekatootie
@callmekatootie
Comment options

@Haroenv
Comment options

@callmekatootie
Comment options

@Haroenv
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants