Skip to content

Fire VirtualizedList edge callbacks after programmatic scrolling (#58657) - #58657

Open
Abbondanzo wants to merge 1 commit into
react:mainfrom
Abbondanzo:export-D100870075
Open

Abbondanzo wants to merge 1 commit into
react:mainfrom
Abbondanzo:export-D100870075

Conversation

@Abbondanzo

@Abbondanzo Abbondanzo commented Sep 23, 2026 •

Copy link
Copy Markdown
Contributor

Summary:

Programmatic list scrolling can move to an edge before asynchronously scheduled cells finish rendering. The scroll handler then skips the edge callback because the terminal cell is not yet in the render window, and no later scroll or layout event is guaranteed.

Recheck edge callbacks after post-scroll render updates. Deduplicate each edge by item count and edge item key, re-arm on real movement away from the edge, and allow data-backed layout growth to start a new end-edge generation without treating measurement-only churn as a new callback.

Changelog:
[General][Fixed] - Fire VirtualizedList edge callbacks after programmatic scrolling

Differential Revision: D100870075

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Sep 23, 2026
@meta-codesync

meta-codesync Bot commented Sep 23, 2026

Copy link
Copy Markdown

@Abbondanzo has exported this pull request. If you are a Meta employee, you can view the originating Diff in D100870075.

Abbondanzo added a commit to Abbondanzo/react-native that referenced this pull request Sep 24, 2026
…ct#58657)

Summary:

Programmatic list scrolling can move to an edge before asynchronously scheduled cells finish rendering. The scroll handler then skips the edge callback because the terminal cell is not yet in the render window, and no later scroll or layout event is guaranteed.

Recheck edge callbacks after post-scroll render updates. Track both content length and item count when an edge callback is sent so internal measurement changes cannot emit duplicates while the list remains at the same edge; scrolling away still re-arms the callback.

Changelog:
[General][Fixed] - Fire `VirtualizedList` edge callbacks after programmatic scrolling

Differential Revision: D100870075
Abbondanzo added a commit to Abbondanzo/react-native that referenced this pull request Sep 24, 2026
…ct#58657)

Summary:

Programmatic list scrolling can move to an edge before asynchronously scheduled cells finish rendering. The scroll handler then skips the edge callback because the terminal cell is not yet in the render window, and no later scroll or layout event is guaranteed.

Recheck edge callbacks after post-scroll render updates. Track both content length and item count when an edge callback is sent so internal measurement changes cannot emit duplicates while the list remains at the same edge; scrolling away still re-arms the callback.

Changelog:
[General][Fixed] - Fire `VirtualizedList` edge callbacks after programmatic scrolling

Differential Revision: D100870075
@Abbondanzo
Abbondanzo force-pushed the export-D100870075 branch 3 times, most recently from 3483d5a to 00b53d2 Compare September 24, 2026 20:42
@meta-codesync meta-codesync Bot changed the title Fire VirtualizedList edge callbacks after programmatic scrolling Fire VirtualizedList edge callbacks after programmatic scrolling (#58657) Oct 1, 2026
Abbondanzo added a commit to Abbondanzo/react-native that referenced this pull request Oct 1, 2026
…ct#58657)

Summary:

Programmatic list scrolling can move to an edge before asynchronously scheduled cells finish rendering. The scroll handler then skips the edge callback because the terminal cell is not yet in the render window, and no later scroll or layout event is guaranteed.

Recheck edge callbacks after post-scroll render updates. Deduplicate each edge by item count and edge item key, re-arm on real movement away from the edge, and allow data-backed layout growth to start a new end-edge generation without treating measurement-only churn as a new callback.

Changelog:
[General][Fixed] - Fire `VirtualizedList` edge callbacks after programmatic scrolling

Differential Revision: D100870075
Abbondanzo added a commit to Abbondanzo/react-native that referenced this pull request Oct 1, 2026
…ct#58657)

Summary:

Programmatic list scrolling can move to an edge before asynchronously scheduled cells finish rendering. The scroll handler then skips the edge callback because the terminal cell is not yet in the render window, and no later scroll or layout event is guaranteed.

Recheck edge callbacks after post-scroll render updates. Deduplicate each edge by item count and edge item key, re-arm on real movement away from the edge, and allow data-backed layout growth to start a new end-edge generation without treating measurement-only churn as a new callback.

Changelog:
[General][Fixed] - Fire `VirtualizedList` edge callbacks after programmatic scrolling

Differential Revision: D100870075
Abbondanzo added a commit to Abbondanzo/react-native that referenced this pull request Oct 1, 2026
…ct#58657)

Summary:

Programmatic list scrolling can move to an edge before asynchronously scheduled cells finish rendering. The scroll handler then skips the edge callback because the terminal cell is not yet in the render window, and no later scroll or layout event is guaranteed.

Recheck edge callbacks after post-scroll render updates. Deduplicate each edge by item count and edge item key, re-arm on real movement away from the edge, and allow data-backed layout growth to start a new end-edge generation without treating measurement-only churn as a new callback.

Changelog:
[General][Fixed] - Fire `VirtualizedList` edge callbacks after programmatic scrolling

Differential Revision: D100870075
…ct#58657)

Summary:

Programmatic list scrolling can move to an edge before asynchronously scheduled cells finish rendering. The scroll handler then skips the edge callback because the terminal cell is not yet in the render window, and no later scroll or layout event is guaranteed.

Recheck edge callbacks after post-scroll render updates. Deduplicate each edge by item count and edge item key, re-arm on real movement away from the edge, and allow data-backed layout growth to start a new end-edge generation without treating measurement-only churn as a new callback.

Changelog:
[General][Fixed] - Fire `VirtualizedList` edge callbacks after programmatic scrolling

Differential Revision: D100870075

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. meta-exported p: Facebook Partner: Facebook Partner

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant