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.
Programmatically controlling the Pagefind UI suggests that “a common use case [for
triggerSearch
andtriggerFilters
] 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:It would be great if we had a
processFilter()
setting allowing us to also synchronize selected filters.