Skip to content

Commit

Permalink
Refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
inokawa committed Aug 20, 2023
1 parent 691183a commit 1926e7f
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/core/store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -208,8 +208,6 @@ export const createVirtualStore = (
if (_scrollDirection === SCROLL_UP) {
diff = calculateJump(cache, updated);
} else if (_isManualScrolling) {
const [startIndex] = _prevRange;

if (scrollOffset === 0) {
// Do nothing to stick to the start
} else if (
Expand All @@ -219,6 +217,7 @@ export const createVirtualStore = (
// Keep end to stick to the end
diff = calculateJump(cache, updated);
} else {
const [startIndex] = _prevRange;
// Keep start at mid
diff = calculateJump(
cache,
Expand Down

0 comments on commit 1926e7f

Please sign in to comment.