Skip to content
This repository was archived by the owner on Apr 23, 2026. It is now read-only.

"Hide items with zero results" option is not working anymore #251

@laulaz

Description

@laulaz

For example in select widget (but it is the same for all widgets).

The class handling "hiding zero results" option is put on the widget (line 14) :

<div class="faceted-widget faceted-select-widget" style="display: none"
i18n:domain="eea" tal:define="
error_view nocall:context/@@faceted.widget.error;
wid python:view.data.getId();
hidden python:view.hidden;
hidezerocount python:view.hidezerocount;
sortcountable python:view.sortcountable;
hidealloption view/data/hidealloption|nothing;
default_value python:view.default or '';
css string:faceted-widget ${view/css_class};
css python:hidden and css + ' faceted-widget-hidden' or css;
css python:view.countable and css + ' faceted-count' or css;
css python:sortcountable and css + ' faceted-sortcountable' or css;
css python:hidezerocount and css + ' faceted-zero-count-hidden' or css;

But the SCSS is wrong :

.faceted-select-widget {
select {
width: 100%;
}
.faceted-select-item-disabled {
color: gray;
}
.faceted-zero-count-hidden {
.faceted-select-item-disabled {
display: none;
}
}

Resulting in a CSS line :

.faceted-select-widget .faceted-zero-count-hidden .faceted-select-item-disabled {
    display: none;
}

which should be :

.faceted-select-widget.faceted-zero-count-hidden .faceted-select-item-disabled {
    display: none;
}

I will propose a PR to fix this ...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions