From 8ea1cba06a78fba023e5a441ad5c4755d0d504ac Mon Sep 17 00:00:00 2001 From: Rob Walker Date: Tue, 17 Jan 2023 05:38:19 -0800 Subject: [PATCH] Remove iOS flag from scrollEventThrottle prop (#35840) Summary: The `scrollEventThrottle` prop is documented as only applying to iOS, but in [this commit](https://github.com/facebook/react-native/commit/cf55fd587e6cc82a73079be6076d244ab72fa359) it was also implemented for Android, but the documentation was not updated. ## Changelog [GENERAL] [CHANGED] - Removed iOS flag from `scrollEventThrottle` docs Pull Request resolved: https://github.com/facebook/react-native/pull/35840 Test Plan: I've not been able to find how to build the docs locally, so I don't have a screenshot of the changes :( Reviewed By: cipolleschi Differential Revision: D42530943 Pulled By: sammy-SC fbshipit-source-id: 2948eca2621712ccd832f4f99f1aab0cbd4af2d0 --- Libraries/Components/ScrollView/ScrollView.js | 35 +++++++++---------- 1 file changed, 16 insertions(+), 19 deletions(-) diff --git a/Libraries/Components/ScrollView/ScrollView.js b/Libraries/Components/ScrollView/ScrollView.js index 7f9fffd8ac3fa3..d4582314d74551 100644 --- a/Libraries/Components/ScrollView/ScrollView.js +++ b/Libraries/Components/ScrollView/ScrollView.js @@ -310,24 +310,6 @@ type IOSProps = $ReadOnly<{| * @platform ios */ pinchGestureEnabled?: ?boolean, - /** - * This controls how often the scroll event will be fired while scrolling - * (as a time interval in ms). A lower number yields better accuracy for code - * that is tracking the scroll position, but can lead to scroll performance - * problems due to the volume of information being send over the bridge. - * - * Values between 0 and 17ms indicate 60fps updates are needed and throttling - * will be disabled. - * - * If you do not need precise scroll position tracking, set this value higher - * to limit the information being sent across the bridge. - * - * The default value is zero, which results in the scroll event being sent only - * once each time the view is scrolled. - * - * @platform ios - */ - scrollEventThrottle?: ?number, /** * The amount by which the scroll view indicators are inset from the edges * of the scroll view. This should normally be set to the same value as @@ -569,7 +551,6 @@ export type Props = $ReadOnly<{| * Note: Vertical pagination is not supported on Android. */ pagingEnabled?: ?boolean, - /** * When false, the view cannot be scrolled via touch interaction. * The default value is true. @@ -577,6 +558,22 @@ export type Props = $ReadOnly<{| * Note that the view can always be scrolled by calling `scrollTo`. */ scrollEnabled?: ?boolean, + /** + * This controls how often the scroll event will be fired while scrolling + * (as a time interval in ms). A lower number yields better accuracy for code + * that is tracking the scroll position, but can lead to scroll performance + * problems due to the volume of information being send over the bridge. + * + * Values between 0 and 17ms indicate 60fps updates are needed and throttling + * will be disabled. + * + * If you do not need precise scroll position tracking, set this value higher + * to limit the information being sent across the bridge. + * + * The default value is zero, which results in the scroll event being sent only + * once each time the view is scrolled. + */ + scrollEventThrottle?: ?number, /** * When true, shows a vertical scroll indicator. * The default value is true.