callstack / callstack/react-native-paper

Menu onDismiss Animation

Ouverte
#4,813 0 commentaires 2 réactions 0 personnes assignées Voir sur GitHub
feature request
Langage dominant
TypeScript
Étoiles
14.5k
Forks
2.2k
Merge moyen
5 j 23 h
PR mergées (30 j)
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.

Guide de contribution

Ouvrir le guide de contribution

Piste de recherche

Start at src/components/Menu/Menu.tsx, especially the onDismiss handling linked around lines 643 and 654, and inspect the existing hide animation flow. Done means the dismiss callback runs after the animation completes and changing visibility from onDismiss no longer cancels that animation.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Stack technique
react-native, typescript
Domaine
mobile
Type d'issue
Fonctionnalité
Difficulté
2/5
Temps estimé
1-3 heures
Activité
À l'abandon
Clarté
Clairement spécifiée
Accessibilité débutants
55/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.