Feature Request: Allowing Attributes to be mapped in urlSync
See original GitHub issueHello,
I’m using Algolia on a project that I’m working with, but I’ve struggled on a step. I hope you guys can assist me here:
Currently, this is the decoded url structure of my search parameter:
urlSync: {
useHash: false,
mapping: {
q: 'ara',
p: 'sayfa'
},
trackedParameters: [
'query', //q
'attribute:color',
'attribute:brand',
'page' //p
]
},
ara=query&sayfa=0&dFR[brand][0]=brandname&dFR[color][0]=colorname&is_v=1
But for a cleaner structure, I want to achieve something like this:
ara=query&sayfa=0&brand=brandname&color=colorname&is_v=1
And for multiple occasions, maybe something like this:
ara=query&sayfa=0&brand=brandname1,brandname2&color=colorname1,colorname2&is_v=1
So in short, how do I change &dFR[attribute][0]=value
to &attribute=value
, at least to &attribute[0]=value
I’m using instantsearch.js 1 from cdn in pro plan, if that would matter.
Any idea would be appreciated.
Thanks in advance,
Issue Analytics
- State:
- Created 7 years ago
- Reactions:7
- Comments:7 (3 by maintainers)
Top Results From Across the Web
Sync your URLs with InstantSearch.js - Algolia
This guide goes through different ways to handle routing with your search UI: Enabling routing with no extra configuration; Manually rewriting ...
Read more >Top 5 algoliasearch-helper Code Examples - Snyk
Allows every widget to alter the state at initialization // without trigger ... { moreAttributes: foreignConfig, mapping: this.mapping, safe: true } ); if ......
Read more >instantsearch.js - UNPKG
instantsearch.js/dist/instantsearch.development.js.map ... and therefore all the known Algolia properties\n * This doesn't contain any beta/hidden features.
Read more >How Algolia built their frontend search widgets with React.js ...
... indexName: options.index_name, urlSync: { mapping: { q: 'text', ... of out of box working functionality but also allows you to change ...
Read more >@lsegurado/ls-element - npm
Does not require extensions to be identified by the IDE, ✓, ✓, ✓, ❌, ✓. Differentiation between attributes and properties in jsx / ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Now that we’ve released we are going to be able to work on this kind of feature.
PS: don’t forget to 👍 this first comment so that we can sort the issue by interest 😃
This will be solved with #2216 and more specifically an API like the proposed in #2636. Have a look, there are demos with the source code.
Closing this for now.