Skip to content

Commit 869bc34

Browse files
committed
fix(repeat): ensure revert mutation handling
1 parent d5a39a0 commit 869bc34

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/array-virtual-repeat-strategy.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -486,6 +486,7 @@ export class ArrayVirtualRepeatStrategy extends ArrayRepeatStrategy implements I
486486
let first_index_after_scroll_adjustment = realScrolltop === 0
487487
? 0
488488
: Math$floor(realScrolltop / itemHeight);
489+
489490
// if first index after scroll adjustment doesn't fit with number of possible view
490491
// it means the scroller has been too far down to the bottom and nolonger suitable to start from this index
491492
// rollback until all views fit into new collection, or until has enough collection item to render
@@ -500,7 +501,7 @@ export class ArrayVirtualRepeatStrategy extends ArrayRepeatStrategy implements I
500501
// repeat._isLastIndex = bot_buffer_item_count_after_scroll_adjustment === 0;
501502
repeat.topBufferHeight = top_buffer_item_count_after_scroll_adjustment * itemHeight;
502503
repeat.bottomBufferHeight = bot_buffer_item_count_after_scroll_adjustment * itemHeight;
503-
// repeat._handlingMutations = false;
504+
(repeat as VirtualRepeat)._handlingMutations = false;
504505
// ensure scroller scroll is handled
505506
(repeat as VirtualRepeat).revertScrollCheckGuard();
506507
repeat.updateBufferElements();

0 commit comments

Comments
 (0)