Skip to content

Fujiwaranosai/react-native-scroll-block

 
 

Repository files navigation

react-native-scroll-block

When touching a View that is inside a ScrollView the pointer propagates and makes the canvas react as well. (facebook/react-native#1046)

The current workaround is to disable the ScrollView (changing scrollEnabled to false) on children's onPanResponderGrant and then enabling it again onPanResponderRelease. (08/04/2016)

This solution will fix that issue if disabling the ScrollView is not an option to you.

Installation

Do an npm i react-native-scroll-block and then try out this simple example :)

Usage

BlockView will block every interaction performed inside it, and will not propagate the pointer to it's parent.

Wrap any View with a BlockView to ensure that the input won't go to the ScrollView.

Props

blocked Boolean

Whether the view should blocked the input.

Default: true

Meta

Written by Maria Julia Racca and Martin Giachetti.

Released under the MIT License: www.opensource.org/licenses/mit-license.php

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Objective-C 73.2%
  • JavaScript 26.8%