I’m using FinSweet’s attributes method to filter a simple CMS of blog posts. I want to have an option called ‘View all’ (which is basically a reset button), that’s selected on page load. I have everything set up and working, except I can’t seem to get the is-active class to apply to my View-all radio button
@tannerxlatham Thanks for this input!
So i tried what you said:
the input radio button (the circle element) has NO identifier attribute but the two attributes you mentioned.
but the behavior is not correct:
when page loads, the show all button is checked, but no entries are shown
when i hit another button, the filter works
when i hit the view all button again, the filter works (it is resetting correctly) BUT the active state is gone. I also found out that the radio element is not really checked then again, which might explain why the active class is not rendered
A short update on that:
Now initially the items are shown.
i moved the fs-cmsfilter-clear attribute away from the input radio element to the radio label element.
so things are working now, BUT still no active class, neither on load nor when i click back to it