反应原生弹出菜单不会在菜单触发器附近弹出

问题描述

我在我的项目中使用 react-native-popup-menu代码

import React,{ Component } from 'react';
import { View,Image,Text,StyleSheet,FlatList } from 'react-native';
import { icons,COLORS } from '../../../../constants'
import {
    MenuProvider,Menu,MenuOptions,MenuOption,MenuTrigger,} from 'react-native-popup-menu';
class Areas extends Component {
    constructor(props) {
        super(props);
        this.state = {}
    }
  render() {
        return (
            <MenuProvider>
                <View style={StyleSheet.conatiner}>
                    <View style={{ display: 'flex',flexDirection: 'row',paddingVertical: 16,borderRadius: 4,backgroundColor: "#F8F9FB",marginTop: 16,paddingLeft: 8,height: 80 }}>
                        <View style={{ flex: .8 }}>
                            <Text>Al falih school</Text>

                        </View>
                        <View style={{ flex: .2,justifyContent: 'center',alignItems: 'center' }}>
                            {/* <Image style={{height:15,width:15}}  source={icons.ellipse} /> */}
                            <Menu>
                                <MenuTrigger children={<Image style={{ height: 15,width: 15 }} source={icons.ellipse} />} />
                                <MenuOptions>
                                    <MenuOption onSelect={() => {
                                    }} customStyles={{ paddingVertical: 8 }}>
                                        <Text>Delete</Text>
                                    </MenuOption>

                                </MenuOptions>
                            </Menu>

                        </View>
                    </View>
                </View>
            </MenuProvider>
        );
    }
}

const styles = StyleSheet.create({
    conatiner: {
        flex: 1,alignItems: 'center',}
});
export default Areas;

输出 [![在此处输入图片描述][1]][1]

如截图所示,触发器旁边没有弹出菜单,如何找到菜单触发器旁边的弹出菜单? [1]:https://i.stack.imgur.com/vJqc0.jpg

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)

相关问答

Selenium Web驱动程序和Java。元素在(x,y)点处不可单击。其...
Python-如何使用点“。” 访问字典成员?
Java 字符串是不可变的。到底是什么意思?
Java中的“ final”关键字如何工作?(我仍然可以修改对象。...
“loop:”在Java代码中。这是什么,为什么要编译?
java.lang.ClassNotFoundException:sun.jdbc.odbc.JdbcOdbc...