Description
Description
Actionsheet (or a modal containing a slide transition) suppresses callbacks for children when using the slide animation.
CodeSandbox/Snack link
https://codesandbox.io/s/delicate-sound-6dodwc?file=/src/components/Example.tsx
Steps to reproduce
- Create an Actionsheet containing a child with an
onPress
callback. Let's say it's a button. - With a physical Android device, click on the actionsheet's button (this seems to work just fine on an emulator).
Note how, despite the button visually reacting to the press, the button's callback does not run.
- Add
animationPreset="none"
to the Actionsheet's props - Repeat step 2
Note how the button's callback now runs.
NativeBase Version
3.3.1
Platform
- Android
- CRA
- Expo
- iOS
- Next
Other Platform
Pixel 7 - Android 13, LGV30 - Android 10, Pixel 3 - Android 12.
Additional Information
We're using the new architecture.
I believe the origin of this issue comes somewhere from the native-base/src/components/composites/Transitions/Slide.tsx or one of its dependencies, as this only occurs when a Modal has a slide transition (as an Actionsheet does by default on an Android device). Disabling the slide animation resolves the issue. I'll admit it's possible this bug comes from a library used by native base, but this seems like a good start to discover the source of the issue and at the very least it documents a work around.
The below video shows the issue as presented from steps 1 and 2, followed by steps 3 and 4 after the hot-reload that disables the slide animation.