CloudCannon / pagefind

Static low-bandwidth search at scale
https://pagefind.app
MIT License
3.48k stars 113 forks source link

Hide empty filters #23

Closed vanbroup closed 2 years ago

vanbroup commented 2 years ago

Currently the filter in the search results shows many values with no results Value (0), it would make it more user friendly if those items would be hidden automatically:

image

bglw commented 2 years ago

Good idea. It does depend on how many values there are — I personally like the explicit (0) when there are only three or four filters — but I see no reason this can't be added as an option.

vanbroup commented 2 years ago

When there are only a few it could make sense (it would tell you these are not available) maybe the check-box could be disabled in these cases.

We have many tags (the ones on the screenshot are just the start) and a few dozen authors, so we would really appreciate the option to hide.

bglw commented 2 years ago

Hi @vanbroup 👋

Support for hiding empty filters has been released in Pagefind v0.5.0 🎉