From d38dffc8a0ba11d92f1994b1af2ff7850e139c86 Mon Sep 17 00:00:00 2001 From: Valentin Shergin Date: Tue, 9 Oct 2018 16:24:58 -0700 Subject: [PATCH] Fabric: Proper defaults for ScrollView's alwaysBounce* Summary: That's actually proper defaults. That fixes problems with horizontally bouncing ScrollView. Reviewed By: mdvacca Differential Revision: D10159458 fbshipit-source-id: b2b6df911b0a23f5e13539caeb48e51cdbc56528 --- .../fabric/components/scrollview/ScrollViewProps.cpp | 6 ++---- ReactCommon/fabric/components/scrollview/ScrollViewProps.h | 4 ++-- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/ReactCommon/fabric/components/scrollview/ScrollViewProps.cpp b/ReactCommon/fabric/components/scrollview/ScrollViewProps.cpp index fd9c50cee..5b104df59 100644 --- a/ReactCommon/fabric/components/scrollview/ScrollViewProps.cpp +++ b/ReactCommon/fabric/components/scrollview/ScrollViewProps.cpp @@ -23,13 +23,11 @@ ScrollViewProps::ScrollViewProps( alwaysBounceHorizontal(convertRawProp( rawProps, "alwaysBounceHorizontal", - sourceProps.alwaysBounceHorizontal, - true)), + sourceProps.alwaysBounceHorizontal)), alwaysBounceVertical(convertRawProp( rawProps, "alwaysBounceVertical", - sourceProps.alwaysBounceVertical, - true)), + sourceProps.alwaysBounceVertical)), bounces(convertRawProp(rawProps, "bounces", sourceProps.bounces, true)), bouncesZoom(convertRawProp( rawProps, diff --git a/ReactCommon/fabric/components/scrollview/ScrollViewProps.h b/ReactCommon/fabric/components/scrollview/ScrollViewProps.h index dd9eedbc7..18bd21ff6 100644 --- a/ReactCommon/fabric/components/scrollview/ScrollViewProps.h +++ b/ReactCommon/fabric/components/scrollview/ScrollViewProps.h @@ -21,8 +21,8 @@ class ScrollViewProps final : public ViewProps { #pragma mark - Props - const bool alwaysBounceHorizontal{true}; - const bool alwaysBounceVertical{true}; + const bool alwaysBounceHorizontal{}; + const bool alwaysBounceVertical{}; const bool bounces{true}; const bool bouncesZoom{true}; const bool canCancelContentTouches{true};