octopitus / rn-sliding-up-panel

Draggable sliding up panel implemented in React Native https://octopitus.github.io/rn-sliding-up-panel/
MIT License
928 stars 157 forks source link

Fix return type of `onBackButtonPress` #145

Closed thib92 closed 4 years ago

thib92 commented 4 years ago

As explained in the BackHandler docs, returning true is mandatory to avoid the default device behavior.

And as seen in this piece of code:

https://github.com/octopitus/rn-sliding-up-panel/blob/fb94487606374ac54580f6827be93a9774f5a165/SlidingUpPanel.js#L333-L335

The custom callback provided by the user must return a boolean too.