callstack / callstack/react-native-paper
Menu onDismiss Animation
- Dominant language
- TypeScript
- Stars
- 14.5k
- Forks
- 2.2k
- Avg merge
- 5d 23h
- Merged PRs (30d)
- 12
Description
**Is your feature request related to a problem? Please describe.**
Some of the menu component's onDismiss handling ([1](https://github.com/callstack/react-native-paper/blob/ff0df5454eb13d6e8e2d8f1c87c0bca8bb3635f0/src/components/Menu/Menu.tsx#L643),[2](https://github.com/callstack/react-native-paper/blob/ff0df5454eb13d6e8e2d8f1c87c0bca8bb3635f0/src/components/Menu/Menu.tsx#L654)) does NOT call hide(); if I change the menu's visibility within ondismiss it cancels the animation entirely
**Describe the solution you'd like**
[make hide accepts a callback](https://github.com/lovegaoshi/azusa-player-mobile/blob/2648f55f4cb6c6dd72433a871a63249cbed79d1e/patches/react-native-paper%2B5.14.5.patch#L18), calls the callback at the end of the animation, and replace the onDismiss to `() => hide(onDismiss)`
**Describe alternatives you've considered**
I might have totally missed the memo on how to control the menu visibility via onDismiss.
**Additional context**
Add any other context or screenshots about the feature request here.
Contributor guide
Assessment
This issue has not been assessed yet.