У меня есть меню dropDown, в котором нужно щелкнуть, но когда я щелкаю его элементы, щелкают базовые элементы, которые представляют собой панель поиска и плоский список, который также можно нажимать.Я хочу, чтобы щелкнуло меню, а не панель поиска или плоский список.что мне делать?
Вот скриншот моего симулятора:
![enter image description here](https://i.stack.imgur.com/0CjEr.jpg)
Я не могу нажать на «Арабский» и «Персидский "в меню.
Вот части моего кода:
import React, { Component } from 'react';
import {StyleSheet, Text, View, FlatList, TouchableOpacity } from 'react-native';
import { List, ListItem, SearchBar } from 'react-native-elements';
import DropdownMenu from 'react-native-dropdown-menu';
import {Header, Left, Right, Icon} from 'native-base'
var SQLite = require('react-native-sqlite-storage')
var db = SQLite.openDatabase({name: 'test.sqlite', createFromLocation: '~dictionary.sqlite'})
var data = [["English", "Arabic", "Persian"]];
export default class App extends Component {
constructor(props) {
super(props)
...
db.transaction((tx) => {
...
}
searchFilterFunction = text => {
...
};
render() {
return (
<View style = {styles.container}>
<Header style={styles.headerStyle}>
...
</Header>
<View style={{height: 3 }}/>
<View style={styles.menuView}>
<DropdownMenu
bgColor={"#B38687"}
activityTintColor={'green'}
titleStyle={{color: '#333333'}}
zIndex={100}
handler={(selection, row) => this.setState({text4: data[selection][row]})}
data={data}
>
</DropdownMenu>
<Icon name="arrow-round-forward" style={styles.iconStyle}/>
<DropdownMenu
bgColor={"#B38687"}
activityTintColor={'green'}
titleStyle={{color: '#333333'}}
zIndex={100}
handler={(selection, row) => this.setState({text: data[selection][row]})}
data={data}
>
</DropdownMenu>
</View >
<View >
<View style={styles.viewBorder}>
<SearchBar
...
/>
</View>
<View style={styles.viewBorder}>
<List containerStyle={{ flexDirection: 'column-reverse', borderTopWidth: 0, borderBottomWidth: 0 }} >
<FlatList
...
onPress={() =>{this.props.navigation.navigate('Meaning', {data: (item.word_english +'\n' + item.word_arabic)} ); }}
...
/> )}
/>
</List>
</View>
</View>
</View>);}
}
const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: '#CBEFDD',
// flexDirection: 'column'
},
iconStyle:{
backgroundColor:'#CBEFDD',
color:'#84B071',
marginLeft: '5%',
marginRight: '5%',
marginTop: 7,
// height:30,
// alignContent:'center'
},
menuView:{
// flex:1,
// height: 50,
marginLeft: 3,
marginRight: 3,
flexDirection:'row',
zIndex:100,
},
rezvanText:{
flex:1 ,
fontSize: 20,
color: 'white',
justifyContent:'flex-end'
},
headerStyle:{
backgroundColor : "#84B071"
},
viewBorder: {
backgroundColor: 'white',
borderWidth: 2,
borderColor: '#B38687',
marginVertical:3,
marginLeft: 3,
marginRight: 3
}
});