-
Notifications
You must be signed in to change notification settings - Fork 513
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Create a "Load more" widget #1344
Comments
I think it could be solve with a specific connector that will keep in its state the knowledge of the previous pages. |
Proposal 💡 🕵️♀️ 🕵️Providing just a load more button won't work because the hits widget is stateless and the API returns What we need 🤓
Limitations 💣
Implementation details 📖
Example 🚀<InstantSearch ...config>
<LoadMoreHits/>
</InstantSearch> |
You just emojied us and it works! LGTM Bring the 1000HitsWidget Now! 🎵 💪 |
☠️ There are some missing stuff and important changes in this PR: - it lets the connector description function `getProps` access the wrapping component to be able to store the previous results hits - there are no tests (but I did test the widget by hand) - it introduce a simple example but it is not meant to be kept - the load more button is disabled is it is the last page (not in the original proposal) - since the header in the widget is broken, I commented it in the layout.pug Next steps: - [ ] add some tests - [ ] integrate this widget in another (TBD) - [ ] uncomment the header in layout.pug FIX #1344
☠️ There are some missing stuff and important changes in this PR: - it lets the connector description function `getProps` access the wrapping component to be able to store the previous results hits - there are no tests (but I did test the widget by hand) - it introduce a simple example but it is not meant to be kept - the load more button is disabled is it is the last page (not in the original proposal) - since the header in the widget is broken, I commented it in the layout.pug Next steps: - [ ] add some tests - [ ] integrate this widget in another (TBD) - [ ] uncomment the header in layout.pug FIX #1344
As a starting point of an infinite scroll documentation/idea, at least having a "Load More" widget seems mandatory.
I am not yet sure on the best way on how to do that in react-instantsearch.
Should we also provide a connector?
The text was updated successfully, but these errors were encountered: