Closed AsadSaleh closed 4 years ago
In this case you must provide onBackButtonPress
prop and handle back button yourself. A bit inconvenient because the panel doesn't know about your navigator stack.
handleBackButton() {
if (this.props.navigation.isFocused()) {
return false
}
// Or simply return !this.props.isFocused() if readability is not your concern.
return true
}
<SlidingUpPanel onBackButtonPress={this.handleBackButton} />
Issue Description:
Android 'back button' close the slide up panel that lives in the previous screen instead of going back to previous screen.
How to reproduce:
I'm using react-navigation.
This has 2 downsides:
Note: This doesn't happen if I press 'back' using the top nav bar.
I cannot propose any solution yet, can anyone please help?
Environment