From cbab004eb94f8312e9b10dae1502d3ca8632a006 Mon Sep 17 00:00:00 2001 From: Joe Vilches Date: Thu, 7 Nov 2024 16:34:31 -0800 Subject: [PATCH] Remove position type override on scroll view sticky headers (#47498) Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/47498 I am trying to help someone with creating a sticky header on a scrollview, specifically one that floats on the side of the scrollview instead of the top Currently we can't really do that, since utilizing `position: absolute` to layout this properly will get overriden by the header styles changed in this diff This was only added since static was the default and we needed to apply zIndex. With proper static implementation that is no longer the case, so I think it makes sense to remove this to support this use case. Changelog: [General] [Breaking] - `position` of sticky headers on `ScrollView` will now be taken into account Reviewed By: rozele Differential Revision: D65626544 fbshipit-source-id: 8d650ca7654918e692435935e7c1094c412fd9f6 --- .../Libraries/Components/ScrollView/ScrollViewStickyHeader.js | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/react-native/Libraries/Components/ScrollView/ScrollViewStickyHeader.js b/packages/react-native/Libraries/Components/ScrollView/ScrollViewStickyHeader.js index d83abfe57a2..1615f3fe0b9 100644 --- a/packages/react-native/Libraries/Components/ScrollView/ScrollViewStickyHeader.js +++ b/packages/react-native/Libraries/Components/ScrollView/ScrollViewStickyHeader.js @@ -301,7 +301,6 @@ const ScrollViewStickyHeaderWithForwardedRef: component( const styles = StyleSheet.create({ header: { zIndex: 10, - position: 'relative', }, fill: { flex: 1,