Hi! I have a documentation issue on InstantSearch.js, I could not find what I was looking for which is:
We are using algolia with magento extension,
We are using sortBySelector widget.
Most relevant is the default selection of this drop-down no matter what we configured which attribute is first.
Where Should we modify to make a default selection like price for example.
The default selection is based on the selected index. You can change the default index by modifying how InstantSearch.js is initialized:
const search = instantsearch({
appId: 'latency',
apiKey: '6be0576ff61c053d5f9a3225e2a90f76',
indexName: 'instant_search', // << HERE
searchParameters: {
hitsPerPage: 8,
},
});
You can change the index here: https://codesandbox.io/embed/vy4prppwmy
Does that solve your problelm @egyprotech ?
@egyprotech any luck here?
Closing for inactivity.
Most helpful comment
The default selection is based on the selected index. You can change the default index by modifying how InstantSearch.js is initialized:
You can change the index here: https://codesandbox.io/embed/vy4prppwmy
Does that solve your problelm @egyprotech ?