From 35f1e308e8bb69e046b5ea2d6fcddfa3bc736f69 Mon Sep 17 00:00:00 2001 From: Ramanpreet Nara Date: Thu, 2 May 2024 12:46:05 -0700 Subject: [PATCH] : Add static ViewConfig for maintainVisibleContentPosition Summary: This prop was introduced for horizontal and vertical scrollview in D40642469. That diff updated the native view configs only. **Note:** This prop did not work for bridgeless mode. Partial fix: Add the prop to vertical scrollview: D54223244 Full fix: this diff. Changelog: [Internal] Reviewed By: javache Differential Revision: D56854757 fbshipit-source-id: aff2da407f4df4575ceb66d3d381a144fa07a8e9 --- .../ScrollView/AndroidHorizontalScrollViewNativeComponent.js | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/react-native/Libraries/Components/ScrollView/AndroidHorizontalScrollViewNativeComponent.js b/packages/react-native/Libraries/Components/ScrollView/AndroidHorizontalScrollViewNativeComponent.js index 63a5dd7d4a0..6cfd728b3e9 100644 --- a/packages/react-native/Libraries/Components/ScrollView/AndroidHorizontalScrollViewNativeComponent.js +++ b/packages/react-native/Libraries/Components/ScrollView/AndroidHorizontalScrollViewNativeComponent.js @@ -23,6 +23,7 @@ export const __INTERNAL_VIEW_CONFIG: PartialViewConfig = { validAttributes: { decelerationRate: true, disableIntervalMomentum: true, + maintainVisibleContentPosition: true, endFillColor: {process: require('../../StyleSheet/processColor').default}, fadingEdgeLength: true, nestedScrollEnabled: true,