Skip to content

Commit

Permalink
Pass modalOnResponderTerminationRequest as func
Browse files Browse the repository at this point in the history
  • Loading branch information
jdoyle65 authored Oct 25, 2016
1 parent 72e1954 commit 2b18c31
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ class DatePicker extends Component {
style={[Style.datePickerCon, {height: this.state.animatedHeight}, customStyles.datePickerCon]}
onStartShouldSetResponder={e => true}
onMoveShouldSetResponder={e => true}
onResponderTerminationRequest={e => !this.props.modalRejectTerminationRequest}
onResponderTerminationRequest={this.props.modalOnResponderTerminationRequest}
>
<DatePickerIOS
date={this.state.date}
Expand Down Expand Up @@ -313,7 +313,7 @@ DatePicker.defaultProps = {
showIcon: true,
disabled: false,
placeholder: '',
modalRejectTerminationRequest: false
modalOnResponderTerminationRequest: e => true
};

DatePicker.propTypes = {
Expand All @@ -331,7 +331,7 @@ DatePicker.propTypes = {
disabled: React.PropTypes.bool,
onDateChange: React.PropTypes.func,
placeholder: React.PropTypes.string,
modalRejectTerminationRequest: React.PropTypes.bool
modalOnResponderTerminationRequest: React.PropTypes.func
};

export default DatePicker;

0 comments on commit 2b18c31

Please sign in to comment.