Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
laulaz opened this issue Oct 27, 2023 · 0 comments
Open

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

laulaz opened this issue Oct 27, 2023 · 0 comments

Comments

@laulaz
Copy link
Contributor

laulaz commented Oct 27, 2023

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 ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant