I have edited example so it would refine the values, and it works. However not in my original work.
The logic is the same as in the example - but just after selecting other attribute (through select dropdown) I get an error about previous attribute being an undeclared facet (and it depends on the which widget was added first by default):
Uncaught Error: Cannot refine the undeclared facet TESTFACET; it should be added to the helper options facets, disjunctiveFacets or hierarchicalFacets
at a.toggleFacetRefinement (firstname.lastname@example.org:2)
at r.toggleFacetRefinement (email@example.com:2)
at r.toggleRefinement (firstname.lastname@example.org:2)
at Object.C [as refine] (email@example.com:2)
at HTMLLIElement. (app.js:17)
at HTMLUListElement.dispatch (jquery-3.3.1.min.js:2)
at HTMLUListElement.y.handle (jquery-3.3.1.min.js:2)
PS: Some why in the example, when filtering by Categories, and picking “Small Kitchen Appliances” - this filter disappears from the list, but still refines the results…
PPS: I tried to add to helper options disjunctiveFacets like this:
And error disappeared, but once I try to refine by ANOTHERFACET all the list and hits disappear.