instea / react-native-popup-menu

Popup menu component for React Native
ISC License
1.48k stars 250 forks source link

Basic menuitem not showing #266

Closed padygeazy closed 1 year ago

padygeazy commented 1 year ago

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", }, });

`

padygeazy commented 1 year ago

Settin optionsStyle helped. Closing issue.