HitsPerPage doesn’t work correctly with routeToState()
See original GitHub issueBug 🐞
What is the current behavior?
- Use the
ais-hits-per-page
component as described in the docs - Then set up the routing as per the “User-friendly URLs” section detailed here: https://www.algolia.com/doc/guides/building-search-ui/going-further/routing-urls/js/#user-friendly-urls
- Using the widget updates the UI state correctly and also updates the URL
- Reloading the page sets the state correctly but doesn’t update the UI of the widget
Make a sandbox with the current behavior
Sandbox example: https://codesandbox.io/embed/vueinstantsearchv2starter-8jx9i
What is the expected behavior?
The dropdown should reflect the selected option in the URL when you have selected something other than the default and then reloaded the page.
Does this happen only in specific situations?
What is the proposed solution?
Unsure!
What is the version you are using?
v2.1.0
Issue Analytics
- State:
- Created 4 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
Configure Widget not accepting query value on search.start()
The only issue is I can't find a way to return a dynamic index object with the correct values through the routeToState() method...
Read more >Vue instantsearch SEO friendly URL
I'm using Vue instantsearch and I want to make the URL a bit pleasing to the eyes so I followed this guide: ...
Read more >instantsearch.js
It doesn't do the search itself,\n * nor does it contains logic about the ... {SearchParameters}\n */\n clearTags: function clearTags() {\n if (this....
Read more >Vue instantsearch SEO friendly URL
But the problem is I couldn't get the category filter to work properly. ... The category is being picked up nicely by the...
Read more >HitsPerPage doesn't work correctly with routeToState()
HitsPerPage doesn't work correctly with routeToState(). algolia/vue-instantsearch. Issue. Bug. What is the current behavior?
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
Aha, so if I were to have a crack at a PR for this would using SortBy as a guide be the simplest way forward?
Thanks for the bug report.
The issue likely comes from the HitsPerPage component that doesn’t pre-select the current refinement, as opposed to the SortBy component.