Skip to content

Commit 4365256

Browse files
committed
[ScrollView] Add "bounces" property to ScrollView propTypes
Summary: The `bounces` property lets you disable rubber-banding. It was already exposed on the native side so this diff is just documenting it in JS. Closes react#264 Github Author: James Ide <ide@jameside.com> Test Plan: Imported from GitHub, without a `Test Plan:` line.
1 parent f8a08df commit 4365256

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

Libraries/Components/ScrollView/ScrollView.js

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,13 +59,20 @@ var ScrollView = React.createClass({
5959
contentOffset: PointPropType, // zeros
6060
onScroll: PropTypes.func,
6161
onScrollAnimationEnd: PropTypes.func,
62-
scrollEnabled: PropTypes.bool, // tre
62+
scrollEnabled: PropTypes.bool, // true
6363
scrollIndicatorInsets: EdgeInsetsPropType, // zeros
6464
showsHorizontalScrollIndicator: PropTypes.bool,
6565
showsVerticalScrollIndicator: PropTypes.bool,
6666
style: StyleSheetPropType(ViewStylePropTypes),
6767
scrollEventThrottle: PropTypes.number, // null
6868

69+
/**
70+
* When true, the scroll view bounces when it reaches the end of the
71+
* content if the content is larger then the scroll view along the axis of
72+
* the scroll direction. When false, it disables all bouncing even if
73+
* the `alwaysBounce*` props are true. The default value is true.
74+
*/
75+
bounces: PropTypes.bool,
6976
/**
7077
* When true, the scroll view bounces horizontally when it reaches the end
7178
* even if the content is smaller than the scroll view itself. The default
@@ -308,6 +315,7 @@ var validAttributes = {
308315
alwaysBounceHorizontal: true,
309316
alwaysBounceVertical: true,
310317
automaticallyAdjustContentInsets: true,
318+
bounces: true,
311319
centerContent: true,
312320
contentInset: {diff: insetsDiffer},
313321
contentOffset: {diff: pointsDiffer},

0 commit comments

Comments
 (0)