appbaseio / reactivesearch

Search UI components for React and Vue
https://opensource.appbase.io/reactivesearch
Apache License 2.0
4.89k stars 468 forks source link

Infinite scroll with multi-page result and sorting are not working properly #371

Closed a-magdy closed 6 years ago

a-magdy commented 6 years ago

Hi,

As always, I have to start with thanking you for your great work here :)

Issue Type: Bug

Platform: Web

Description: Sorting a multi-page result with infinite scroll breaks the component

Screenshots: screencapture-localhost-3001-2018-05-17-15_47_06

skaermbillede 2018-05-17 kl 15 43 39

Minimal reproduction of the problem with instructions:

Reactivesearch version: 2.6.2

Browser: Chrome 66

Anything else:

metagrover commented 6 years ago

Thanks for bringing this up. Your contributions help us make this project better everyday 😄

To fix this, as suggested above, we will need to reset the current page state to 0, and thereby using from as 0 in the resultant query, whenever there is a change in sort.

It should be a simple implementation if you or anyone wants to take this up. Open to PRs.

a-magdy commented 6 years ago

Thank you :)

would love to open a PR, I'd appreciate a pointer or a hint that gets me closer to the file/module where I can start working on, I don't know the structure of the app yet, the hint doesn't have to be very specific, anything would help :D

a-magdy commented 6 years ago

PR created: https://github.com/appbaseio/reactivesearch/pull/372

metagrover commented 6 years ago

PR Merged!