callstack / callstack/react-native-paper
Menu appearing behind other components
- Vorherrschende Sprache
- TypeScript
- Sterne
- 14.5k
- Forks
- 2.2k
- Ø Merge
- 5 T. 23 Std.
- Gemergte PRs (30 T.)
- 12
Beschreibung
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).
Beitragsleitfaden
Rechercherichtung
Beginnen Sie in src/core/PaperProvider.tsx und vergleichen Sie dessen Props-Deklaration mit der generierten Datei lib/typescript/core/PaperProvider.d.ts. Reproduzieren Sie das im Issue gezeigte Problem mit der Menüebenenreihenfolge und überprüfen Sie, dass die Styling-Änderung des Providers bewirkt, dass das Menü über den anderen Komponenten erscheint; im Bericht wird keine Testdatei genannt.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- react-native, typescript
- Bereich
- frontend, mobile
- Issue-Typ
- Bug
- Schwierigkeit
- 2/5
- Geschätzter Aufwand
- 1-3 Stunden
- Aktivitätsstatus
- Veraltet
- Klarheit
- Klar beschrieben
- Anfängerfreundlichkeit
- 48/100