Skip to content

Commit 55275ba

Browse files
authored
fix scrollEnable get override issue
in the case that `lockScrollWhileSnapping={true}` and `enableMomentum={false}`. `scrollEnabled` gets override even when it was set to false.
1 parent 4d2a955 commit 55275ba

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

src/carousel/Carousel.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -474,6 +474,7 @@ export default class Carousel extends Component {
474474
return;
475475
}
476476

477+
value = value && scrollEnabled
477478
// 'setNativeProps()' is used instead of 'setState()' because the latter
478479
// really takes a toll on Android behavior when momentum is disabled
479480
wrappedRef.setNativeProps({ scrollEnabled: value });

0 commit comments

Comments
 (0)