fix anchor range check

This commit is contained in:
Aaron Munger
2023-09-22 11:08:03 -07:00
parent 1f70856242
commit bad883bd6a

View File

@@ -528,7 +528,7 @@ export class ListView<T> implements IListView<T> {
// do not scroll the viewport if resized element is out of viewport
heightDiff = size - originalSize;
} else {
if (anchorIndex !== null && anchorIndex > index && anchorIndex <= lastRenderRange.end) {
if (anchorIndex !== null && anchorIndex > index && anchorIndex < lastRenderRange.end) {
// anchor in viewport
// resized element in viewport and above the anchor
heightDiff = size - originalSize;