- Issue created by @jacobbell84
- last update
6 months ago Composer require failure - last update
6 months ago 2 fail - last update
6 months ago 2 fail
Currently the core views facets module's URL processor does most of the heavy lifting for the 'active' state in the setActiveItems function. The problem is that's late in the processor life cycle, which causes functions like getActiveFilters to be empty due to the 'active' state not having been calculated yet. Some of the facet model's functionality, like the reset link, depend on that function in order to work correctly.
Modeled after the QueryString url processor, I moved the active state logic to occur in the processor's constructor. I then modified it to store the information in the activeFilters array, which the getActiveFilters and setActiveItems functions depend on. I also overwrote the getFilterKey function to return the view's URL parameter, which is also needed for the reset functionality to work. After making these changes, the reset link appears to work correctly for me.
Needs review
2.0
Code