callstack / callstack/react-native-paper
Menu appearing behind other components
- Langage dominant
- TypeScript
- Étoiles
- 14.5k
- Forks
- 2.2k
- Merge moyen
- 5 j 23 h
- PR mergées (30 j)
- 12
Description
Hi! 👋
Firstly, thanks for your work on this project! 🙂
Today I used [patch-package](https://github.com/ds300/patch-package) to patch `react-native-paper@5.14.5` for the project I'm working on.
**Problem:** Menu was appearing behind other components.
Before:
After:
Here is the diff that solved my problem:
```diff
diff --git a/node_modules/react-native-paper/lib/typescript/core/PaperProvider.d.ts b/node_modules/react-native-paper/lib/typescript/core/PaperProvider.d.ts
index de236cc..feeba5f 100644
--- a/node_modules/react-native-paper/lib/typescript/core/PaperProvider.d.ts
+++ b/node_modules/react-native-paper/lib/typescript/core/PaperProvider.d.ts
@@ -5,6 +5,7 @@ export type Props = {
children: React.ReactNode;
theme?: ThemeProp;
settings?: Settings;
+ style?: StyleProp;
};
declare const PaperProvider: (props: Props) => React.JSX.Element;
export default PaperProvider;
diff --git a/node_modules/react-native-paper/src/core/PaperProvider.tsx b/node_modules/react-native-paper/src/core/PaperProvider.tsx
index 51839a5..d8f1a16 100644
--- a/node_modules/react-native-paper/src/core/PaperProvider.tsx
+++ b/node_modules/react-native-paper/src/core/PaperProvider.tsx
@@ -4,6 +4,8 @@ import {
Appearance,
ColorSchemeName,
NativeEventSubscription,
+ StyleProp,
+ ViewStyle,
} from 'react-native';
import SafeAreaProviderCompat from './SafeAreaProviderCompat';
@@ -18,6 +20,7 @@ export type Props = {
children: React.ReactNode;
theme?: ThemeProp;
settings?: Settings;
+ style?: StyleProp;
};
const PaperProvider = (props: Props) => {
@@ -109,7 +112,7 @@ const PaperProvider = (props: Props) => {
);
return (
-
+
{children}
```
This issue body was [partially generated by patch-package](https://github.com/ds300/patch-package/issues/296).
Guide de contribution
Ouvrir le guide de contribution
Piste de recherche
Start in src/core/PaperProvider.tsx and compare its Props declaration with the generated lib/typescript/core/PaperProvider.d.ts file. Reproduce the menu layering problem shown in the issue and verify that the provider's styling change makes the menu appear above the other components; no test file is named in the report.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- react-native, typescript
- Domaine
- frontend, mobile
- Type d'issue
- Bug
- Difficulté
- 2/5
- Temps estimé
- 1-3 heures
- Activité
- À l'abandon
- Clarté
- Clairement spécifiée
- Accessibilité débutants
- 48/100