Setting default refinement values in Vue Instantsearch

Hello,

Is there a way to set default refinement values on the ais-refinement-list tag so that these are automatically selected on load? For example some thing like:

<ais-refinement-list attribute-name="source.category" default-values="['cat1', 'cat2', 'cat20']" inline-template>

I am using vue-instantsearch.

Any suggestions/ pointers to the documentation would be great as i can’t seem to find anything.

Hi there,

Do you want to set initial values or do you want static values?

Hey,

It’s not currently possible to do this directly on the widget, but ais-index accepts a prop called query-parameters. In that one you can list the default values you’d want selected.

You can check what kind of shape it should have by applying those refinements and looking for queries in your network devtools panel. That will show which parameters to add.

Hope that helped