如何从react native下拉列表中删除选定的项目文本?

问题描述

我使用react-native-material-dropdown,当我选择一个项目时,所选项目可见。如何使其消失以避免像这样在图像上获取文字: 非常感谢您的帮助!

enter image description here

        <View style={[styles.centeredView,{marginTop:0}]}>
      <MaterialDropdown
        data={data_dropdown}
        pickerStyle={styles.dropdownPickerStyle}
        affixTextStyle={{ fontFamily: "FunctionLH" }}
        itemTextStyle={{ fontFamily: "FunctionLH" }}
        labelTextStyle={{ fontFamily: "FunctionLH" }}
        containerStyle={styles.dropdownContainerStyle}
        itemCount={10}
        dropdownPosition={-4.5}
        underlineColor='transparent'
        labelExtractor={({ label }) => label}
        valueExtractor={({ value }) => value}
        propsExtractor={({ props },index) => props}
        onChangeText={(value) => this.choiceAction(value)}
        useNativeDriver={true}
      />
      <Image
        source={require("../../assets/images/btn-filter-by-period.png")}
        style={{resizeMode: "contain",width: "95%",height: 50,borderRadius: 100 / 2,position: 'absolute',margin: 0,padding: 0,height:30,borderRadius:0}}/>
    </View>

解决方法

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

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

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