Skip to content

Commit

Permalink
Merge pull request #531 from SSTPIERRE2/sstpierre2/disableNextButton
Browse files Browse the repository at this point in the history
Optionally disable the 'next' control button
  • Loading branch information
Bart Arribe authored Sep 8, 2017
2 parents a8e052c + 6e72f19 commit 8daa616
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ export default class extends Component {
automaticallyAdjustContentInsets: PropTypes.bool,
showsPagination: PropTypes.bool,
showsButtons: PropTypes.bool,
disableNextButton: PropTypes.bool,
loadMinimal: PropTypes.bool,
loadMinimalSize: PropTypes.number,
loadMinimalLoader: PropTypes.element,
Expand Down Expand Up @@ -160,6 +161,7 @@ export default class extends Component {
automaticallyAdjustContentInsets: false,
showsPagination: true,
showsButtons: false,
disableNextButton: false,
loop: true,
loadMinimal: false,
loadMinimalSize: 1,
Expand Down Expand Up @@ -538,7 +540,10 @@ export default class extends Component {
}

return (
<TouchableOpacity onPress={() => button !== null && this.scrollBy(1)}>
<TouchableOpacity
onPress={() => button !== null && this.scrollBy(1)}
disabled={this.props.disableNextButton}
>
<View>
{button}
</View>
Expand Down

0 comments on commit 8daa616

Please sign in to comment.