-
Notifications
You must be signed in to change notification settings - Fork 157
fix(ssr): forward slots of the AisInstantSearchSsr component #898
Conversation
The clone created in findResultsState also manually needs to forward slots, or the data won't be available.
A demo is available here: https://github.com/algolia/vue-instantsearch/tree/demo/slot-component/examples/nuxt |
It works after deleting |
you possibly still have an old version of the package installed somehow (maybe nuxt cache or something like that), I had it as well, but not sure what causes the old version to stay |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit 23f625f:
|
sandbox for this version @eunjae-lee https://codesandbox.io/s/kind-dream-x7zk1?file=/pages/search.vue |
https://codesandbox.io/s/frosty-shadow-lm50t?file=/pages/search-2.vue
Never mind. search-2 had two InstantSearch components nested. Now it's fixed and it seems fine. |
…/vue-instantsearch#898) * fix(ssr): forward slots of the AisInstantSearchSsr component The clone created in findResultsState also manually needs to forward slots, or the data won't be available. * Update src/util/createServerRootMixin.js * chore: also forward root * scoped slots doesn't work, add tests
The clone created in findResultsState also manually needs to forward slots, or the data won't be available.