diff --git a/README.md b/README.md index dd8cd73..4a481fe 100644 --- a/README.md +++ b/README.md @@ -44,6 +44,7 @@ In wrapping around the ScrollView and using the TextInput to control keyboard we | contentInset | `{top: 0, left: 0, bottom: 0, right: 0}` | `object` | Set to the ScrollView contentInset prop | | onScroll | `() => {}` | `func` | Set to the ScrollView onScroll function. It will be called alongside our own | | onRefFocus | `()=>{}` | `func` | Gives back the 'ref' of the node whenever a smart component is focused | +| bounces | `()=>{}` | `bool` | Controls bouncing of the underlying ScrollView | #### Smart Component Props diff --git a/SmartScrollView.js b/SmartScrollView.js index cc7eaf9..2eec39d 100644 --- a/SmartScrollView.js +++ b/SmartScrollView.js @@ -162,7 +162,8 @@ class SmartScrollView extends Component { contentInset, onScroll, keyboardDismissMode, - keyboardShouldPersistTaps + keyboardShouldPersistTaps, + bounces } = this.props; let inputIndex = 0; const smartClone = (element, i) => { @@ -240,8 +241,8 @@ class SmartScrollView extends Component { zoomScale = { zoomScale } showsVerticalScrollIndicator = { showsVerticalScrollIndicator } keyboardShouldPersistTaps = {keyboardShouldPersistTaps} - bounces = { false } keyboardDismissMode = {keyboardDismissMode} + bounces = { bounces } > {content} @@ -262,6 +263,7 @@ SmartScrollView.propTypes = { onRefFocus: PropTypes.func, keyboardDismissMode: PropTypes.string, keyboardShouldPersistTaps: PropTypes.string, + bounces: PropTypes.bool, }; SmartScrollView.defaultProps = { @@ -273,7 +275,8 @@ SmartScrollView.defaultProps = { onScroll: () => {}, onRefFocus: () => {}, keyboardDismissMode: 'none', - keyboardShouldPersistTaps: 'always' + keyboardShouldPersistTaps: 'always', + bounces: false }; export default SmartScrollView;