Open ColeDCrawford opened 5 months ago
Blank searches should be possible by passing null
instead of ””
🙂
Nice, that worked great with the Pagefind search API. Is there a setting or equivalent way to do that with the Default UI component?
Not at the moment, no. Work is soon going into rounding out and releasing the modular-ui, which will include features like this.
Thanks - is there a separate repo for the modular-ui? Just not sure how stable it is / when I should feel comfortable moving to that instead of the Default UI.
@bglw it looks like in the v1.1.0
release there is a search.triggerSearch()
method for the Default UI, but it looks like it doesn't work with null
? Is it possible to get that updated to allow for a blank search?
@ColeDCrawford did you ever find a solution to this? I'm having the same issue.
@ColeDCrawford did you ever find a solution to this? I'm having the same issue.
Not for the Default UI. I played around with customizing some of the components in the Modular UI but didn't get anything satisfactory working there either.
@bglw if this could get into the next release that would be great ... I went down the path of trying to work with the Modular UI but encountered a number of other issues there.
Can do!
I have a page on which I'd like to use Pagefind as the primary way to interact with content. I would like to preload some content on that page, but without any search term. If I use the default UI it seems like Pagefind requires a search term to return any results; same with the Javascript API:
I'd like to be able to force a "blank" or "empty" search which would just return all the results until the user starts filtering or searching on them. As shown above, Pagefind seems to be returning nothing. Are blank searches currently possible, or possible to add?