Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cache ScrollView content length before calling scrollToIndex #38736

Closed
wants to merge 1 commit into from

Conversation

NickGerleman
Copy link
Contributor

Summary:
scrollToIndex relies on cached layout information, so we should cache the results from onContentSizeChange before attempting the scroll. Otherwise we will fail to scroll in RTL.

Changelog:
[General][Fixed] Cache ScrollView content length before calling scrollToIndex

Differential Revision: D47978635

@facebook-github-bot facebook-github-bot added CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. p: Facebook Partner: Facebook Partner fb-exported labels Aug 2, 2023
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D47978635

@analysis-bot
Copy link

analysis-bot commented Aug 2, 2023

Platform Engine Arch Size (bytes) Diff
android hermes arm64-v8a 8,894,538 +185
android hermes armeabi-v7a 7,943,116 +190
android hermes x86 9,292,431 +183
android hermes x86_64 9,193,971 +189
android jsc arm64-v8a 9,481,029 +27
android jsc armeabi-v7a 8,422,591 +23
android jsc x86 9,465,076 +41
android jsc x86_64 9,779,316 +23

Base commit: 0a1c2ef
Branch: main

…ook#38736)

Summary:
Pull Request resolved: facebook#38736

`scrollToIndex` relies on cached layout information, so we should cache the results from `onContentSizeChange` before attempting the scroll. Otherwise we will fail to scroll in RTL.

Changelog:
[General][Fixed] Cache ScrollView content length before calling `scrollToIndex`

Reviewed By: lenaic

Differential Revision: D47978635

fbshipit-source-id: 8a9952cf5146a10ce38465ccb9922e531a772287
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D47978635

@github-actions
Copy link

github-actions bot commented Aug 3, 2023

This pull request was successfully merged by @NickGerleman in 33d6da0.

When will my fix make it into a release? | Upcoming Releases

@github-actions github-actions bot added the Merged This PR has been merged. label Aug 3, 2023
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. fb-exported Merged This PR has been merged. p: Facebook Partner: Facebook Partner
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants