Skip to content

Document ScrollView API completion #2113

@kikisaints

Description

@kikisaints

The following unchecked properties are needed to complete the ScrollView control integration into RNWCPP.

P1

  • snapToInterval
    When set, causes the scroll view to stop at multiples of the value of snapToInterval.
    Not directly supported by ScrollViewer. Can be implemented as snap points (Win 8) on the child of the ScrollViewer.
  • snapToOffsets
    When set, causes the scroll view to stop at the defined offsets.
    Not directly supported by ScrollViewer. Can be implemented as snap points (Win 8) on the child of the ScrollViewer.
  • snapToStart ScrollView snapToStart #3065
    Use in conjunction with snapToOffsets. By default, the beginning of the list counts as a snap offset. Set snapToStart to false to disable this behavior and allow the list to scroll freely between its start and the first snapToOffsets offset. The default value is true.
    Not directly supported by ScrollViewer. Can be implemented in conjunction with adding snap points (Win 8) to the child of the ScrollViewer.
  • snapToEnd ScrollView snapToEnd #3066
    Use in conjuction with snapToOffsets. By default, the end of the list counts as a snap offset. Set snapToEnd to false to disable this behavior and allow the list to scroll freely between its end and the last snapToOffsets offset. The default value is true.
    Not directly supported by ScrollViewer. Can be implemented in conjunction with adding snap points (Win 8) to the child of the ScrollViewer.
  • snapToAlignment
    When snapToInterval is set, snapToAlignment will define the relationship of the snapping to the scroll view.
    Not directly supported by ScrollViewer. Can be implemented in conjunction with adding snap points (Win 8) to the child of the ScrollViewer.
  • removeClippedSubviews View removeClippedSubviews #3067
    Experimental: When true, offscreen child views (whose overflow value is hidden) are removed from their native backing superview when offscreen. This can improve scrolling performance on long lists. The default value is true.
    Not directly supported by ScrollViewer. Seems difficult. Needs deep dive.
  • keyboardDismissMode ScrollView keyboardDismissMode #3068
    Determines whether the keyboard gets dismissed in response to a drag.
    Not directly supported by ScrollViewer. Mobile-specific. Could be difficult, needs deep dive.
  • scrollEnabled
    When false, the view cannot be scrolled via touch interaction. The default value is true. Note that the view can always be scrolled by calling scrollTo.
    Maps to ScrollViewer.VerticalScrollMode/HorizontalScrollMode (Win 8)
  • showsHorizontalScrollIndicator
    When true, shows a horizontal scroll indicator. The default value is true.
    Maps to ScrollViewer.HorizontalScrollBarVisibility (Win 8)
  • showsVerticalScrollIndicator
    When true, shows a vertical scroll indicator. The default value is true.
    Maps to ScrollViewer.VerticalScrollBarVisibility (Win 8)

P2

  • refreshControl ScrollView refreshControl #3069
    A RefreshControl component, used to provide pull-to-refresh functionality for the ScrollView. Only works for vertical ScrollViews (horizontal prop must be false).
    Not directly supported by ScrollViewer. Could maybe use RefreshContainer from MUX (RS4), or drop down to InteractionTracker (RS1) and build one from scratch.
  • onMomentumScrollBegin
    Called when the momentum scroll starts (scroll which occurs as the ScrollView glides to a stop).
    Not directly supported by ScrollViewer. Could hook up to ViewChanging and look at ScrollViewerChangingEventArgs.IsInertial.
  • onMomentumScrollEnd
    Called when the momentum scroll ends (scroll which occurs as the ScrollView glides to a stop).
    Not directly supported by ScrollViewer. Could hook up to ViewChanging/ViewChanged and look at ScrollViewerChangingEventArgs.IsInertial.
  • stickyHeaderIndices ScrollView stickyHeaderIndices #3070
    An array of child indices determining which children get docked to the top of the screen when scrolling. For example, passing stickyHeaderIndices={[0]} will cause the first child to be fixed to the top of the scroll view. This property is not supported in conjunction with horizontal={true}.
    Not directly supported by ScrollViewer. Seems difficult. Needs deep dive.

P3

  • decelerationRate ScrollView decelerationRate #3071
    A floating-point number that determines how quickly the scroll view decelerates after the user lifts their finger.
    Not supported by ScrollViewer.
  • pagingEnabled ScrollView pagingEnabled #3072
    When true, the scroll view stops on multiples of the scroll view's size when scrolling. This can be used for horizontal pagination. The default value is false.
    Not directly supported by ScrollViewer. Can be implemented by adding snap points (Win 8) to the child of the ScrollViewer
  • keyboardShouldPersistTaps ScrollView keyboardShouldPersistTaps #3073
    Determines when the keyboard should stay visible after a tap.
    Not directly supported by ScrollViewer. Mobile-specific. Could be difficult, needs deep dive.

Already Completed

  • horizontal
  • onScroll
  • onScrollBeginDrag
  • onScrollEndDrag
  • onContentSizeChange
  • contentContainerStyle
Future
  • alwaysBounceVertical iOS Only
  • endfillColor Android Only
  • overScrollMode Android Only
  • scrollPerfTag Android Only
  • alwaysBounceHorizontal iOS Only
  • automactiallyAdjustcontentInsets iOS Only
  • bounces iOS Only
  • bouncesZoom iOS Only
  • canCancelContentTouches iOS Only
  • centerContent iOS Only
  • contentInset iOS Only
  • contentInsetAdjustmentBehavior iOS Only
  • contentOffset iOS Only
  • directionalLockEnabled iOS Only
  • indicatorStyle iOS Only
  • maximumZoomScale iOS Only
  • minimumZoomScale iOS Only
  • pinchGestureEnabled iOS Only
  • scrollEventThrottle iOS Only
  • scrollIndicatorInsets iOS Only
  • scrollsToTop iOS Only
  • zoomScale iOS Only
  • nestedScrollEnabled Android Only

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions