Skip to content
This repository has been archived by the owner on Dec 30, 2022. It is now read-only.

feat(infiniteHits): add previous button #2296

Merged
merged 40 commits into from
Apr 25, 2019

Conversation

yannickcr
Copy link
Contributor

@yannickcr yannickcr commented Apr 9, 2019

Summary

The InfiniteHits widget is used to display a list of results with a “Show more” button. The user can click on this button to display more results without leaving its current page context.

Each time the user click on the “Show more” button the user will navigate to a new page (provided that you implmented URL routing in your React integration).

However, in the case the user navigates directly to a particular page (direct link, previous button, page refresh) then the widget only displays the last result page.

This change add a previous button to the Infinite Hits widget to give the possibility to the user to load the previous result pages.

For implementation details see the full RFC.

Result

A "with previous button" story has been added for the Instant Hits widget.

https://deploy-preview-2296--react-instantsearch.netlify.com/storybook/?path=/story/infinitehits--with-previous-button

@yannickcr yannickcr requested review from tkrugg, samouss, mthuret and a team April 9, 2019 12:32
@algobot
Copy link
Contributor

algobot commented Apr 9, 2019

Deploy preview for react-instantsearch ready!

Built with commit 7c0250e

https://deploy-preview-2296--react-instantsearch.netlify.com

stories/util.js Outdated Show resolved Hide resolved
stories/util.js Outdated Show resolved Hide resolved
stories/util.js Outdated Show resolved Hide resolved
stories/util.js Outdated Show resolved Hide resolved
@yannickcr yannickcr force-pushed the feat/infinitehits-previous-button branch from 64f1a20 to 48faedd Compare April 24, 2019 11:53
@yannickcr yannickcr merged commit 010a69a into master Apr 25, 2019
@yannickcr yannickcr deleted the feat/infinitehits-previous-button branch April 25, 2019 13:55
samouss added a commit that referenced this pull request May 15, 2019
# [5.6.0](v5.5.0...v5.6.0) (2019-05-15)

### Bug Fixes

* **connectQueryRules:** avoid to throw an error with undefined values ([#2436](#2436)) ([1e18287](1e18287))

### Features

* **infiniteHits:** add previous button ([#2296](#2296)) ([010a69a](010a69a))
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants