Skip to content

Fire VirtualizedList edge callbacks after programmatic scrolling - #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. Track the item count when an edge callback is sent so internal measurement changes cannot emit duplicates while the list remains at the same edge; appending data or scrolling away re-arms the 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 2 times, most recently from 947d91e to 3483d5a Compare September 24, 2026 17:03
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 the item count when an edge callback is sent so internal measurement changes cannot emit duplicates while the list remains at the same edge; appending data or scrolling away re-arms the 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