From c43a3f5d8412eb0dfe894a192f15efa9c41ab318 Mon Sep 17 00:00:00 2001 From: Emil Sjolander Date: Wed, 28 Sep 2016 10:02:05 -0700 Subject: [PATCH] Default scrollview to flexShrink to allow views below it Summary: Changing from flex -> flexGrow on Scrollview caused some layouts to break due to having views below the scrollview. Adding flexShrink allows for the behavior again. Reviewed By: blairvanderhoof Differential Revision: D3936963 fbshipit-source-id: 0f43e6f5148918d3d431b98d26d185bbcc1548d0 --- Libraries/Components/ScrollView/ScrollView.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Libraries/Components/ScrollView/ScrollView.js b/Libraries/Components/ScrollView/ScrollView.js index 611440b3a..8f75a9573 100644 --- a/Libraries/Components/ScrollView/ScrollView.js +++ b/Libraries/Components/ScrollView/ScrollView.js @@ -546,11 +546,13 @@ const ScrollView = React.createClass({ const styles = StyleSheet.create({ baseVertical: { flexGrow: 1, + flexShrink: 1, flexDirection: 'column', overflow: 'scroll', }, baseHorizontal: { flexGrow: 1, + flexShrink: 1, flexDirection: 'row', overflow: 'scroll', },