Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow passing partial contentOffset to ScrollView on Android (#28817)
Summary: Since support for contentOffset was added to horizontal ScrollView on android (30cc158) I'm seeing a crash in my app because of a library. What happens is that it passes a partial object for contentOffset so something like `{x: 1}` which causes a crash on Android. According to the flow types the object should always contain both x and y but I think we should preserve the runtime behaviour and just use 0 like iOS does. ## Changelog [Android] [Fixed] - Allow passing partial contentOffset to ScrollView on Android Pull Request resolved: #28817 Test Plan: Tested that passing partial object for contentOffset does not crash. Reviewed By: JoshuaGross Differential Revision: D21396319 Pulled By: shergin fbshipit-source-id: 4b52c868e3bfe183ff7f68a76ac34d1abd5e1069
- Loading branch information
I would have thought this will just ignore the undefined axis- not zero it out. If anyone wants to scroll on a specific axis and not affect the other one.
Otherwise what’s the point in this?