From 55275ba85b6435cae58966f8b3e6df3dea8b62e5 Mon Sep 17 00:00:00 2001 From: "Tsung Han (Jake) Yang" Date: Thu, 6 Sep 2018 18:58:48 -0700 Subject: [PATCH] fix scrollEnable get override issue in the case that `lockScrollWhileSnapping={true}` and `enableMomentum={false}`. `scrollEnabled` gets override even when it was set to false. --- src/carousel/Carousel.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/carousel/Carousel.js b/src/carousel/Carousel.js index 5259e9103..a89b0c1dc 100644 --- a/src/carousel/Carousel.js +++ b/src/carousel/Carousel.js @@ -474,6 +474,7 @@ export default class Carousel extends Component { return; } + value = value && scrollEnabled // 'setNativeProps()' is used instead of 'setState()' because the latter // really takes a toll on Android behavior when momentum is disabled wrappedRef.setNativeProps({ scrollEnabled: value });