question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Nuxt Instant Search broken when used with router and index mapping

See original GitHub issue

Bug 🐞

What is the current behavior?

When used with Nuxt combined with routing and singleIndexMapping the query parameters are removed after hitting refresh.

when this is added on line 106 in the sandbox:

stateMapping: singleIndexMapping("instant_search"),

the route on click on a facet does not change at all.

Make a sandbox with the current behavior

https://codesandbox.io/s/friendly-parm-hy2m2?file=/pages/search.vue

What is the expected behavior?

  1. Clock on Apple in the facets
  2. Url changes to https://hy2m2.sse.codesandbox.io/search?refinement[refinementList][brand][0]=Apple
  3. hit the refresh button
  4. the url stays same and the UiState is recreated

Does this happen only in specific situations?

Happens all the time

What is the proposed solution?

What is the version you are using?

algoliasarch 4.10.5 nuxt 2.15.8 vue-instantsearch 4.0.1 vue-server-renderer 2.6.11

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:1
  • Comments:27 (10 by maintainers)

github_iconTop GitHub Comments

3reactions
sarahdayancommented, Oct 13, 2021

We’ve filed this internally and will schedule a fix, thanks for reporting! We’ll follow up here when we tackle it.

1reaction
podlebarcommented, Feb 2, 2022

hey… will try to do one and track the problems down to be more specific… but i guess it won’t be today

Read more comments on GitHub >

github_iconTop Results From Across the Web

Server-side rendering with Vue InstantSearch - Algolia
There are different ways of making a server-side rendered app with Vue. We'll cover how to do it with Vue CLI and with...
Read more >
nuxt.js - Why is Algolia removing my url query parameters ...
A workaround that works pretty well is not using algolia routing at all. ... for more search parameters and things like different indices....
Read more >
How To Navigate Between Views with Vue Router
In Vue.js, you can create several views using the first-party library Vue Router. This router makes an association with a view to a...
Read more >
The router Property - Nuxt
Notice that you may, or may not set up a Front Proxy Web Server. If you want to have a redirect to router.base...
Read more >
Create a keyboard navigable site search with Nuxt/Content ...
Tagged with algolia, vue, nuxt, tutorial. ... plugins/vue-instantsearch is Algolia's library of pre-built Vue components that we will ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found