You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
At the moment, hasPrevious returns true if ScrollPosition#isInitial at position 0 is false, while for hasNext we rely on Window#hasNext. This works fine for offset scrolling which is always forward, and where the offset value allows checking where we are in the overall result set.
In keyset scrolling, however, we only know if there are more results ahead but not before, and this goes along with the direction of scrolling. For forward-scroll we know hasNext but not hasPrevious. For backward scroll we know hasPrevious, but not hasNext. The GraphQL pagination spec covers this, and allows forward-scroll to return hasPrevious=false if not known, and backward-scroll to return hasNext=false if it is not known.
We need to adjust the logic in hasPrevious/hasNext in keyset scrolling accordingly.
The text was updated successfully, but these errors were encountered:
Uh oh!
There was an error while loading. Please reload this page.
At the moment,
hasPrevious
returns true ifScrollPosition#isInitial
at position 0 isfalse
, while forhasNext
we rely onWindow#hasNext
. This works fine for offset scrolling which is always forward, and where the offset value allows checking where we are in the overall result set.In keyset scrolling, however, we only know if there are more results ahead but not before, and this goes along with the direction of scrolling. For forward-scroll we know
hasNext
but nothasPrevious
. For backward scroll we knowhasPrevious
, but nothasNext
. The GraphQL pagination spec covers this, and allows forward-scroll to returnhasPrevious=false
if not known, andbackward-scroll
to returnhasNext=false
if it is not known.We need to adjust the logic in
hasPrevious
/hasNext
in keyset scrolling accordingly.The text was updated successfully, but these errors were encountered: