Skip to content
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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

duplicated inifinite hits with slow network #2928

Closed
iam4x opened this issue May 16, 2018 · 1 comment
Closed

duplicated inifinite hits with slow network #2928

iam4x opened this issue May 16, 2018 · 1 comment

Comments

@iam4x
Copy link
Contributor

iam4x commented May 16, 2018

Describe the bug 馃悰
When using the infinite hits widget on a slow network, clicking show more button may load duplicated hits.

To Reproduce 馃攳
Steps to reproduce the behavior:

  1. Go to https://community.algolia.com/instantsearch.js/v2/dev-novel/?selectedStory=InfiniteHits.default
  2. Force your network settings to a slow network (example 3G)
  3. Click on "Show more"
  4. Scroll down to the hits
  5. See the duplicated entries

Expected behavior 馃挱
Do not load/display duplicated hits.

Screenshots 馃枼
image

Environment:
Slow network

@iam4x iam4x changed the title inifinite hits with slow network duplicated inifinite hits with slow network May 16, 2018
@bobylito
Copy link
Contributor

Render is called if there are new results and if the search is stalled. There are no checks in the implementation that prevents this new rendering: https://github.com/algolia/instantsearch.js/blob/develop/src/connectors/infinite-hits/connectInfiniteHits.js#L105-L133 (This is a working hypothesis for now, I will double check)

bobylito pushed a commit that referenced this issue May 23, 2018
bobylito pushed a commit that referenced this issue May 23, 2018
bobylito added a commit that referenced this issue May 28, 2018
* refactor(connectInfiniteHits): use jest instead of sinon in tests
* test(connectInfiniteHits): confirm #2928
* test(connectInfiniteHits): remove unsupported option from test
* fix(connectInfiniteHits): fix #2928
* refactor(connectInfiniteHits-test): review from @samouss
bobylito added a commit that referenced this issue May 28, 2018
* refactor(connectInfiniteHits): use jest instead of sinon in tests
* test(connectInfiniteHits): confirm #2928
* test(connectInfiniteHits): remove unsupported option from test
* fix(connectInfiniteHits): fix #2928
* refactor(connectInfiniteHits-test): review from @samouss
bobylito pushed a commit that referenced this issue May 28, 2018
<a name=2.7.5></a>
## [2.7.5](v2.7.4...v2.7.5) (2018-05-28)

### Bug Fixes

* **clear-all:** apply excludeAttribute correctly with clearsQuery ([#2935](#2935)) ([e782ab8](e782ab8))
* **connectInfiniteHits:** fix [#2928](#2928)  ([#2939](#2939)) ([0293a31](0293a31))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants