升级Native Base后React Native Select组件仅点击箭头可触发的问题求助
Native Base Select组件点击触发异常问题
近期升级Native Base后,在React Native应用中使用Select组件时遇到问题:只有点击下拉箭头才能触发下拉菜单,点击组件的其他区域均无法触发下拉。
实现代码
let testTypeOptions = [ { value: 6, label: 'Maternity Test' }, { value: 18, label: 'Paternity Test' }, ]; <Container style={cocStyle.container}> <View style={cocStyle.formContainer}> <Select selectedValue={examDetail?.testType} onValueChange={value => handleChange('testType', value)}> {testTypeOptions.map((test, index) => ( <Select.Item key={index} {...test} /> ))} </Select> </View> </Container> const cocStyle = StyleSheet.create({ container: { paddingTop: 10, width: '60%', alignSelf: 'center' }, formContainer: { ...formStyles.formWrapper, width: '100%', flexWrap: 'wrap', flexDirection: 'row', }, });
组件显示效果

内容的提问来源于stack exchange,提问作者chewie
相关产品推荐
相关产品推荐

