There is a but in current version of Easystore that prevents from deselecting a filter in the filter add-on.
The bug is located in /media/com_easystore/js/products.site.js
The issue is that the current logic is getting all instances of the same filter. As far as in my SPPageBuilder page, the same filter is present twice on the same page (Once for my normal website, one for my mobile website), it gets all checked cases. This means even if I uncheck on the dektop page, it still gets the checked value from the hidden mobile page:
const elementsOfSameFilter = document.querySelectorAll(
`[data-easystore-filter-by="${filterBy}"]`
);
This can be seen on console. e.g. after unchecking "Gants" and typing the following in console:
elementsOfSameFilter.forEach((element) => {
const matched = element.querySelectorAll(
'input[type="checkbox"]:checked, input[type="radio"]:checked'
);
if (matched.length) {
checkedItems.push(...matched);
}
});
I get:
[
{ filter: 0, visible: true, checked: ["gants"] },
{ filter: 1, visible: false, checked: ["gants"] }
]
which proves I have 2 filters, one true, one false.
Could you please solve this as this is very annoying (even if I currenly managed to work around it with a custom JSS in my template).
Thanks a lot
PS: Btw, I cannot chose my domain in your select box on this forum. I have 2 different subscription, one "All-Access Personal" with 1 site (the one I have EasyStore on) and one "Business" with my other sites that don't need Easystore. Looks like only the sites I created under Business appear in your dropdown.