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

Add a processFilter() setting to the PagefindUI #588

Open
nhoizey opened this issue Apr 2, 2024 · 0 comments
Open

Add a processFilter() setting to the PagefindUI #588

nhoizey opened this issue Apr 2, 2024 · 0 comments
Labels
improvement Not a bug Pagefind UI The prebuilt Pagefind UI components

Comments

@nhoizey
Copy link
Contributor

nhoizey commented Apr 2, 2024

Programmatically controlling the Pagefind UI suggests that “a common use case [for triggerSearch and triggerFilters] is initializing the Pagefind UI based on query parameters”.

As we have a processTerm() setting allowing us to synchronize search terms typed by users to the URL:

processTerm: function (term) {
  history.replaceState({}, "", `?q=${encodeURIComponent(term)}`);
  return term;
},

It would be great if we had a processFilter() setting allowing us to also synchronize selected filters.

@bglw bglw added improvement Not a bug Pagefind UI The prebuilt Pagefind UI components labels Apr 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
improvement Not a bug Pagefind UI The prebuilt Pagefind UI components
Projects
None yet
Development

No branches or pull requests

2 participants