algolia / vue-instantsearch

👀 Algolia components for building search UIs with Vue.js
https://www.algolia.com/doc/guides/building-search-ui/what-is-instantsearch/vue
MIT License
854 stars 157 forks source link

feat(dynamicWidgets): add fallback slot to render attributes without matching component #1142

Closed aymeric-giraudet closed 1 year ago

aymeric-giraudet commented 2 years ago

FX-1683

Due to library users need, this PR introduces a fallback slot to ais-dynamic-widgets, which works similarly as fallbackComponent for react-instantsearch.

codesandbox-ci[bot] commented 2 years ago

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 055ac490134febef0d75ab98f2c0e0e30b56e4ba:

Sandbox Source
vue-instantsearch-e-commerce Configuration
Haroenv commented 2 years ago

Did you test this with server-side rendering? in React InstantSearch Hooks this required extra code to ensure the rendering happens twice so the required widgets can be rendered correctly. I'm not sure if this code exists in Vue InstantSearch too

aymeric-giraudet commented 2 years ago

@Haroenv I guess I should discard this PR. I think it could be nice to add the sample I did to the DynamicWidgets doc vue flavor though ! What do you think ?