Facets with 'Empty facet behavior' set to >> Do not display facet

Created on 8 February 2024, 5 months ago
Updated 17 April 2024, 2 months ago

Problem/Motivation

I have a number of facets that all work exactly as designed except for the fact the setting ...

... does not appear to work very well.

In each case, at least the block Title is present and, even though the wrapping facet div is clearly marked with the class facet-empty facet-hidden confirming what I have asked for, the facets block is not strictly 'empty' and so the space is allocated for it on the rendered page...

<div class="facet-inactive hidden block-facet--links block block-facets block-facet-blockcontent-type"
  id="block-bit-by-bit-type">

  <h2>Content type</h2>

  <div data-drupal-facet-id="content_type" class="facet-empty facet-hidden">
    <div class="facets-widget-links">
    </div>
  </div>

</div>

Does anyone have any ideas or guidance as to whether my expectations are wrong or on how to combat this (maybe with some nifty Twig)?

Thanks all

๐Ÿ› Bug report
Status

Needs review

Version

2.0

Component

User interface

Created by

๐Ÿ‡ฌ๐Ÿ‡งUnited Kingdom SirClickALot Somerset

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

Merge Requests

Comments & Activities

Production build 0.69.0 2024