Module ScrollView-BsReactNative

module type ScrollViewComponent = { ... };
module CreateComponent: (Impl: BsReactNative.View.Impl) => ScrollViewComponent;
include ScrollViewComponent;
type point = {
x: float,
y: float,
};

Component that wraps platform ScrollView while providing integration with touch locking "responder" system. ScrollView simply renders all its react child components at once. That makes it very easy to understand and use. You can read more on ScrollView component usage in official docs: https://facebook.github.io/react-native/docs/scrollview

Props

View props

contentContainerStyle
~contentContainerStyle: Style.t=?
contentInsetAdjustmentBehavior
~contentInsetAdjustmentBehavior: [
  | `automatic
  | `scrollableAxes
  | `never
  | `always
]=?,
horizontal
~horizontal: bool=?,
keyboardDismissMode
~keyboardDismissMode: [
  | `interactive
  | `none
  | `onDrag
]=?,
keyboardShouldPersistTaps
~keyboardShouldPersistTaps: [
  | `always
  | `handled
  | `never
]=?,
onContentSizeChange
~onContentSizeChange: ((float, float)) => unit=?,
onScroll
~onScroll: RNEvent.NativeScrollEvent.t => unit=?,

Reference RNEvent.NativeScrollEvent

onScrollBeginDrag
~onScrollBeginDrag: RNEvent.NativeScrollEvent.t => unit=?,

Reference RNEvent.NativeScrollEvent

onScrollEndDrag
~onScrollEndDrag: RNEvent.NativeScrollEvent.t => unit=?,

Reference RNEvent.NativeScrollEvent

onMomentumScrollBegin
~onMomentumScrollBegin: RNEvent.NativeScrollEvent.t => unit=?,

Reference RNEvent.NativeScrollEvent

onMomentumScrollEnd
~onMomentumScrollEnd: RNEvent.NativeScrollEvent.t => unit=?,

Reference RNEvent.NativeScrollEvent

pagingEnabled
~pagingEnabled: bool=?,
refreshControl
~refreshControl: ReasonReact.reactElement=?,
scrollEnabled
~scrollEnabled: bool=?,
showsHorizontalScrollIndicator
~showsHorizontalScrollIndicator: bool=?,
stickyHeaderIndices
~stickyHeaderIndices: list(int)=?,
overScrollMode
~overScrollMode: [
  | `always
  | `auto
  | `never
]=?,
scrollPerfTag
~scrollPerfTag: string=?,
alwaysBounceHorizontal
~alwaysBounceHorizontal: bool=?,
alwaysBounceVertical
~alwaysBounceVertical: bool=?,
automaticallyAdjustContentInsets
~automaticallyAdjustContentInsets: bool=?,
bounces
~bounces: bool=?,
canCancelContentTouches
~canCancelContentTouches: bool=?,
centerContent
~centerContent: bool=?,
contentInset
~contentInset: Types.insets=?,
contentOffset
~contentOffset: point=?,

reference:

type point = {
  x: float,
  y: float
};
decelerationRate
~decelerationRate: [
  | `fast
  | `normal
]=?,
directionalLockEnabled
~directionalLockEnabled: bool=?,
indicatorStyle
~indicatorStyle: [ | `black | `default | `white]=?,
maximumZoomScale
~maximumZoomScale: float=?,
minimumZoomScale
~minimumZoomScale: float=?,
scrollEventThrottle
~scrollEventThrottle: int=?,
scrollIndicatorInsets
~scrollIndicatorInsets: Types.insets=?,

reference:

Types.rei
type insets = {
  .
  "left": int,
  "right": int,
  "top": int,
  "bottom": int,
};
scrollsToTop
~scrollsToTop: bool=?,
snapToInterval
~snapToInterval: float=?,
snapToAlignment
~snapToAlignment: [
  | `center
  | `end_
  | `start
]=?,
zoomScale
~zoomScale: float=?,
let scrollTo: ReasonReact.reactRef => x:int => y:int => animated:bool => unit;

Methods

scrollTo
let scrollToEnd: ReasonReact.reactRef => animated:bool => unit;
scrollToEnd
let make: ?⁠accessibilityLabel:ReasonReact.reactElement => ?⁠accessible:bool => ?⁠contentInsetAdjustmentBehavior:BsReactNative.ScrollViewProps.contentInsetAdjustmentBehavior => ?⁠hitSlop:BsReactNative.Types.insets => ?⁠onAccessibilityTap:(unit => unit) => ?⁠onLayout:(BsReactNative.RNEvent.NativeLayoutEvent.t => unit) => ?⁠onMagicTap:(unit => unit) => ?⁠responderHandlers:BsReactNative.Types.touchResponderHandlers => ?⁠pointerEvents:BsReactNative.Types.pointerEvents => ?⁠removeClippedSubviews:bool => ?⁠style:BsReactNative.Style.t => ?⁠testID:string => ?⁠accessibilityComponentType:BsReactNative.Types.accessibilityComponentType => ?⁠accessibilityLiveRegion:BsReactNative.Types.accessibilityLiveRegion => ?⁠collapsable:bool => ?⁠importantForAccessibility:BsReactNative.Types.importantForAccessibility => ?⁠needsOffscreenAlphaCompositing:bool => ?⁠renderToHardwareTextureAndroid:bool => ?⁠accessibilityTraits:list(BsReactNative.Types.accessibilityTrait) => ?⁠accessibilityRole:BsReactNative.Types.accessibilityRole => ?⁠accessibilityStates:list(BsReactNative.Types.accessibilityState) => ?⁠accessibilityHint:string => ?⁠accessibilityIgnoresInvertColors:bool => ?⁠accessibilityViewIsModal:bool => ?⁠shouldRasterizeIOS:bool => ?⁠contentContainerStyle:BsReactNative.Style.t => ?⁠horizontal:bool => ?⁠keyboardDismissMode:BsReactNative.ScrollViewProps.keyboardDismissMode => ?⁠keyboardShouldPersistTaps:BsReactNative.ScrollViewProps.keyboardShouldPersistTaps => ?⁠onContentSizeChange:((float, float) => unit) => ?⁠onScroll:(BsReactNative.RNEvent.NativeScrollEvent.t => unit) => ?⁠onScrollBeginDrag:(BsReactNative.RNEvent.NativeScrollEvent.t => unit) => ?⁠onScrollEndDrag:(BsReactNative.RNEvent.NativeScrollEvent.t => unit) => ?⁠onMomentumScrollBegin:(BsReactNative.RNEvent.NativeScrollEvent.t => unit) => ?⁠onMomentumScrollEnd:(BsReactNative.RNEvent.NativeScrollEvent.t => unit) => ?⁠pagingEnabled:bool => ?⁠refreshControl:ReasonReact.reactElement => ?⁠scrollEnabled:bool => ?⁠showsHorizontalScrollIndicator:bool => ?⁠showsVerticalScrollIndicator:bool => ?⁠stickyHeaderIndices:list(int) => ?⁠overScrollMode:BsReactNative.ScrollViewProps.overScrollMode => ?⁠scrollPerfTag:string => ?⁠alwaysBounceHorizontal:bool => ?⁠alwaysBounceVertical:bool => ?⁠automaticallyAdjustContentInsets:bool => ?⁠bounces:bool => ?⁠canCancelContentTouches:bool => ?⁠centerContent:bool => ?⁠contentInset:BsReactNative.Types.insets => ?⁠contentOffset:point => ?⁠decelerationRate:BsReactNative.ScrollViewProps.decelerationRate => ?⁠directionalLockEnabled:bool => ?⁠indicatorStyle:BsReactNative.ScrollViewProps.indicatorStyle => ?⁠maximumZoomScale:float => ?⁠minimumZoomScale:float => ?⁠scrollEventThrottle:int => ?⁠scrollIndicatorInsets:BsReactNative.Types.insets => ?⁠scrollsToTop:bool => ?⁠snapToInterval:float => ?⁠snapToAlignment:BsReactNative.ScrollViewProps.snapToAlignment => ?⁠zoomScale:float => array(ReasonReact.reactElement) => ReasonReact.component(ReasonReact.stateless, ReasonReact.noRetainedProps, unit);