You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Which backends and packages are you using:
Backend: App Search, Gatsby
Packages: react-search-ui, search-ui-app-search-connector, gatsby (see package.json in repo for more info)
More info
As you can see in the github repo, I have two instances of <SearchProvider>. One in layout.js wrapping the header searchbox and one in searchresult.js wrapping the result listing. But I have also tried moving the <SearchProvider> to gatsby-browser.js and add it there so one provider wraps the entire page, like so:
exportconstwrapRootElement=({ element })=>{return<SearchProviderconfig={config}>{element}</SearchProvider>;};
If I do like this the search result page updates as it should, but instead it breaks the SSR on all pages, so no rendered HTML is returned from the server, which is kind of the thing with Gatsby.
Any help greatly appreciated!
The text was updated successfully, but these errors were encountered:
navigate is Gatsbys native routing component to navigate to other pages without losing state. A window.location.href forces a complete reload of the page.
When using Search UI together with Gatsby, the search result page is not updated. See movie and repo.
To Reproduce
npm install
gatsby build && gatsby serve
yosemite
, notice that autocomplete hits are shown.Expected behavior
Search result page should update and show hit for Yellowstone.
Movie
https://user-images.githubusercontent.com/223954/218965171-359a0a21-7324-4060-a1ed-dbd910e821b2.mp4
Which backends and packages are you using:
Backend: App Search, Gatsby
Packages: react-search-ui, search-ui-app-search-connector, gatsby (see package.json in repo for more info)
More info
As you can see in the github repo, I have two instances of
<SearchProvider>
. One inlayout.js
wrapping the header searchbox and one insearchresult.js
wrapping the result listing. But I have also tried moving the<SearchProvider>
togatsby-browser.js
and add it there so one provider wraps the entire page, like so:If I do like this the search result page updates as it should, but instead it breaks the SSR on all pages, so no rendered HTML is returned from the server, which is kind of the thing with Gatsby.
Any help greatly appreciated!
The text was updated successfully, but these errors were encountered: