react-native-screens
react-native-screens copied to clipboard
feat(iOS): introduce modal dismiss event on drag down attempt
Description
As described in this discussion, this PR intercepts the event when a user tries to drag down the view, allowing to perform additional actions, such as displaying an Action Sheet for confirmation.
Changes
- Updated
types.tsx
- RNSScreen.h
- RNSScreen.mm
Screenshots / GIFs
https://github.com/software-mansion/react-native-screens/assets/12258850/469aa86a-a79f-4a0d-a08b-37b82f1fcf20
Test code and steps to reproduce
Not yet, but requires gestureEnabled: false
and onModalDismiss: () => showActionSheet()
Checklist
- [ ] Included code example that can be used to test this change
- [x] Updated TS types
- [ ] Updated documentation:
- [ ] https://github.com/software-mansion/react-native-screens/blob/main/guides/GUIDE_FOR_LIBRARY_AUTHORS.md
- [ ] https://github.com/software-mansion/react-native-screens/blob/main/native-stack/README.md
- [x] https://github.com/software-mansion/react-native-screens/blob/main/src/types.tsx
- [ ] https://github.com/software-mansion/react-native-screens/blob/main/src/native-stack/types.tsx
- [ ] Ensured that CI passes
Hi @gtokman, thanks for opening this issue! 🥳
Unfortunately our CD is failing on the method onModalDismiss(nil)
😕 Also, I don't know if I understand the onModalDismiss
prop correctly - where are we passing the logic of this function to the native code?