currentRefinedValues not clearing

Hello,

I’m using the instantsearch.widgets.currentRefinedValues widget but for some reason it doesn’t clear the refined values I’ve set by default (via the searchParameters). I need to click it twice before the filter goes away.

For other filters it works as expected.

I use these facets in another widget as well and when I try to remove the active filter in the widget it unchecks the checkbox but it doesn’t change the search results.

You can see this issue at http://markputs.nl/algolia.php

And for some reason the default selected model isn’t selected in the widget Modellen. Any idea what might cause this?

Hi @mark

It seems you are forcing the definition of your facets as both disjunctive and conjunctive:

	var search = instantsearch({
	  appId: window.algoliaAppId,
	  apiKey: window.algoliaApiKey,
	  indexName: window.algoliaIndexName,
	  urlSync: true,
	  searchParameters: {
	  	facetsRefinements: window.searchRefinements,
	  	disjunctiveFacetsRefinements: window.searchRefinements,
		facets: window.searchFacets, // HERE
		disjunctiveFacets: window.searchFacets // HERE
  	  },

And the JS Helper does not support such configuration. Widget do this configuration for you normally, but I see you want to add some default values.

I suggest that you try a more subtle approach only defining once the facets disjunctive or conjunctive based on their usage in the widgets. For example, a facet attribute that is later used in a refinement list with the operator value and will be conjunctive (using the facets and facetsRefinements attributes), conjunctive otherwise.

Let me know if that answers your question.