Refresh summary on facets filter update

Created on 8 July 2025, 4 days ago

Problem/Motivation

I am trying to implement facets 3.x as a PoC on one of our projects. We'd like to use the "pills" to remove individual filters on the overview page.
When clicking one of the reset buttons, the filter checkboxes get correctly updated, but the buttons do not update, all previously applied filters are still displayed.

Steps to reproduce

The page is a page manager page with a sidebar and main content.
The BEF is rendered as its own block (render filters as separate block is enabled in the view).
The BEF is rendered in the sidebar. Using a custom hidden block, the view is built before the filters to be able to see the facets (otherwise the facets are empty).
Ajax is enabled on the view, as well as auto submit on changing filters.

The filters summary is also rendered in a custom block, which renders the header of the view (where the summary is added ($view->display_handler->renderArea('header'))).

When selecting a facet, the view is correctly updated, but the filters summary is only updated with a full page refresh.

My question

I do not see this as an actual bug, I am more wondering what the issue here actually is and how to add a proper wrapper so that AJAX calls also trigger the filters summary block.

💬 Support request
Status

Active

Version

3.1

Component

Code

Created by

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @Sneezycheesy
  • 🇫🇷France mably

    Is the header block updated when the view is refreshed using Ajax?

    Not sure the problem is related to this module...

  • The issue I am running into is that the header of the view is not printed by default, because the view's content is placed in the page manager.
    For this reason, a custom block had to be made to be able to render whatever is placed in the header of the view (in this case the facets summary), but this block is not related/connected to the view itself and thus, isn't updated when the view is.

    I've been trying to manually update the content of the block using JS eventsubscribers, but so far without any luck.

  • 🇫🇷France mably

    Javascript is probably the way to go using some kind of MutationObserver.

Production build 0.71.5 2024