instea/react-native-popup-menu

Basic menuitem not showing

padygeazy opened this issue · 1 comments

popup menu 0.16.1
native 0.70.6

popup menu shows but no menu item. If i add more items, the popup size increases correspondingly but no item text shown. Have tried custom styles etc. Removed all styles also.

Code - ( ignore the extra space i added at tag begin to display the code here )

`
import { Image, StyleSheet, Text, View, FlatList, ScrollView } from "react-native";
import React from "react";
import {
Menu,
MenuProvider,
MenuOptions,
MenuOption,
MenuTrigger,
renderers
} from "react-native-popup-menu";
import Entypo from "react-native-vector-icons/Entypo";
import { data } from "../data";

const ScrollViewMenu = () => {
return (
< MenuProvider style={styles.container}>
< Menu>
< MenuTrigger text='Select'>
< /MenuTrigger>
< MenuOptions>
< MenuOption text='A' optionsStyle={styles.optionsStyle}/>
< MenuOption text='B' />
< MenuOption text='C' />
< MenuOption text='D' />
< /MenuOptions>
< /Menu>
< /MenuProvider>
);
};

export default ScrollViewMenu;

const styles = StyleSheet.create({
container: {
flex: 1,
marginVertical: 200,
marginHorizontal: 100,
backgroundColor: 'blue'
},
optionsStyle: {
opacity: 50,
backgroundColor: 'red',
alignItems: 'center'
},
scroll: {
flexDirection: "row",
alignItems: "center",
justifyContent: "space-between",
},
});

`

Settin optionsStyle helped. Closing issue.