Skip to content

Commit

Permalink
fix: Hide HomeLocationsPicker on back button / backdrop press
Browse files Browse the repository at this point in the history
  • Loading branch information
kachnitel committed Dec 8, 2019
1 parent 2cade6a commit 49517e8
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions components/sign_up/HomeLocationsPicker.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,8 @@ class HomeLocationsPicker extends React.Component {
</View>
<ModalView
isVisible={this.state.visible}
onBackButtonPress={this.onCancel}
onBackdropPress={this.onCancel}
>
<LocationPicker
style={styles.locationPicker}
Expand Down Expand Up @@ -138,9 +140,9 @@ class HomeLocationsPicker extends React.Component {
}))
}

// onCancel = () => {
// this.setState({ visible: false })
// }
onCancel = () => {
this.setState({ visible: false })
}
}

const styles = StyleSheet.create({
Expand All @@ -160,7 +162,7 @@ const styles = StyleSheet.create({
flexDirection: 'row',
backgroundColor: '#fff2',
borderRadius: Layout.window.hp(2.75),
alignItems: 'center'
maxWidth: '100%'
},
selectedItemText: {
color: '#fff',
Expand Down

0 comments on commit 49517e8

Please sign in to comment.