aymeric-giraudet / svelte-algolia-instantsearch

A Svelte component library for Algolia InstantSearch.js
https://svelte-algolia-instantsearch.vercel.app/
MIT License
45 stars 12 forks source link

Allow customization to InstantSearch routing #36

Open mathg opened 8 months ago

mathg commented 8 months ago

I'm trying to add some stateMapping customization to the routing to remove the index name from the route as per ref here.

I'm passing the following to the routing object but it doesn't seem to do anything.

{
  stateMapping: singleIndex('index_name')
}

singleIndex is coming from import { singleIndex } from 'instantsearch.js/es/lib/stateMappings/index';

Would be nice to be able to send custom routing object to InstantSearch instead of just a boolean.