Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/core/checkResetContainers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export function checkResetContainers(
const shouldMaintainScrollAtEnd =
maintainScrollAtEnd === true || (maintainScrollAtEnd as MaintainScrollAtEndOptions).onDataChange;

const didMaintainScrollAtEnd = shouldMaintainScrollAtEnd && doMaintainScrollAtEnd(ctx, state, false);
const didMaintainScrollAtEnd = shouldMaintainScrollAtEnd && doMaintainScrollAtEnd(ctx, state, true);

// Reset the endReached flag if new data has been added and we didn't
// just maintain the scroll at end
Expand Down
2 changes: 1 addition & 1 deletion src/core/handleLayout.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ export function handleLayout(
}

if (maintainScrollAtEnd === true || (maintainScrollAtEnd as MaintainScrollAtEndOptions).onLayout) {
doMaintainScrollAtEnd(ctx, state, false);
doMaintainScrollAtEnd(ctx, state, true);
}
updateAlignItemsPaddingTop(ctx, state);
checkAtBottom(ctx, state);
Expand Down
2 changes: 1 addition & 1 deletion src/core/updateItemSize.ts
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ export function updateItemSize(
}
if (shouldMaintainScrollAtEnd) {
if (maintainScrollAtEnd === true || (maintainScrollAtEnd as MaintainScrollAtEndOptions).onItemLayout) {
doMaintainScrollAtEnd(ctx, state, false);
doMaintainScrollAtEnd(ctx, state, true);
Copy link

Copilot AI Dec 30, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The PR description mentions "this should be decided by the user," but the MaintainScrollAtEndOptions interface does not include an animated property. Users currently have no way to control whether the scroll animation is enabled or disabled when maintainScrollAtEnd is triggered. Consider adding an animated?: boolean property to the MaintainScrollAtEndOptions interface to allow users to override the default behavior.

Copilot uses AI. Check for mistakes.
}
}
}
Expand Down