algolia/angular-instantsearch

RouteState does not change on popstate

SRYVPRASAD opened this issue ยท 0 comments

๐Ÿ› Current behavior

RouteState does not change on popstate

  • when the user navigates back using the browser back button the routestate does not change.
  • So the URL is not changing. after the facets are used.

live demo: https://bimcontent-develop.netlify.app/content/

or

else try this demo
same code
https://stackblitz.com/edit/github-2qf3td-1v3tby?file=README.md,src%2Fapp%2Fsearch%2Fsearch.component.ts

Steps to reproduce
navigate to: search/
and change the Categories.

๐Ÿ” Steps to reproduce

https://bimcontent-develop.netlify.app/content/

  1. Select the facets (example: brand )
    output URL: bimcontent-develop.netlify.app/content/?_brand=selectedBrand

  2. Then navigate to one of the products listed
    Output: The page is changed and URL as well

  3. Now navigate back using the browser Back button and change the brand using facet.

  • If the user nav back URL: bimcontent-develop.netlify.app/content/?_brand=selectedBrand.

  • After changing the brand expected
    Output URL: bimcontent-develop.netlify.app/content/?_brand=selectedBrand2

  • but the URL is the same, it doesn't work anymore.
    Output URL: bimcontent-develop.netlify.app/content/?_brand=selectedBrand

Live reproduction
https://stackblitz.com/edit/github-2qf3td-1v3tby?file=README.md,src%2Fapp%2Fsearch%2Fsearch.component.ts

๐Ÿ’ญ Expected behavior

Expected Output

  • If the user navigates back using the browser back button.
  • And changes the facets of the URL should change accordingly.

Package version
"angular-instantsearch": "4.3.0",

Operating system
windows 10

Browser
google chrome