Custom clearRefinement is reloading the same URL which contains filter

Dear Team,

I have implemented routing with my instant search and when I try to clear my all refinements the page just gets reloaded with all the refinement as it it.

Please take a look here -
https://deals-qa.hidubai.com/search-page/?category=Accounting%20Services&stores=American%20Eagle%20Outfitters%C2%AE

The clear refinement widget is custom widget which is created using customClearRefinements and I am using the refine() method to clearAllRefinements.

Please help me to resolve the issue.

Thanks

Interesting – it’s working for me in Chrome, but not in Firefox. Any way you can put the refinement code in a codesandbox?

I get a “resourceValue not defined” error in Firefox that I don’t see in Chrome, but I’m not sure that’s related.

Hi @chuck.meyer ,

I will try to reproduce the same issue in codesandbox and share the link. It might take some time meanwhile if you can debug my source code (algolia-search.js) file and figure out anything please do let me know.

“resourceValue not defined” is error from Ads file. So I don’t think so they are related. (Hopefully)

Note: If you see our production code (Find Discount Sale, Promo offers in Dubai | HiDubai Deals) when routing is not enabled everything looks fine. After clicking “clear all” button all refinement get cleared.

Only after enabling the routing the “clear all” is not working as expected.

Thanks