CloudCannon / pagefind

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

Add `openFilters` configuration option #579

Closed vanbroup closed 6 months ago

vanbroup commented 6 months ago

The default behavior of the filter display is to show values only when there is one filter with six or fewer values. This PR adds a configuration option called openFilters that allows users to include a list of filter names that will open by default, regardless of the number of filters or values present.

new PagefindUI({
    element: "#search",
+    openFilters: ['Tags','Type']
});
bglw commented 6 months ago

Nice one! Thanks for the contribution 😄