如何忽略反应原生模态的拖拽

问题描述

我正在使用标准的 React Native Modal,它包含一个颜色选择器:react-native-wheel-color-picker。

问题是移动颜色选择器时的拖动事件被模态拾取,并且扰乱了用户交互。

<Modal
    presentationStyle="pageSheet"
    animationType="slide"
    visible={showCreate}

    >

    <View style={styles.modalView}>
      <View style={{marginBottom: 10,paddingVertical: 20,flexDirection: "row",justifyContent: "space-between",borderBottomColor: "#ccc",borderBottomWidth: 1}}> 
        <TouchableOpacity onPress={() => setShowCreate(false)}>
          <Text style={{fontSize: 17}}>Cancel</Text>
        </TouchableOpacity>
        <Text style={{fontSize: 17,fontWeight: "bold"}}>
            Create Tag
        </Text>
        <Text style={{fontSize: 17}}>
            Save
        </Text>
      </View>
      <CreateTag />
  </View>
  </Modal>

颜色选择器在元素中:

            <View style={{flex: 1}}>

            <ColorPicker
                    // ref={r => { this.picker = r }}
                    // color={this.state.false.state.swatchesOnly}
                    onColorChange={c => (c) = setColor(c)}
                    // onColorChangeComplete={this.onColorChangeComplete}
                    thumbSize={30}
                    sliderSize={20}
                    // noSnap={false}
                    // row={true}
                    // swatchesLast={this.state.swatchesLast}
                    swatches={false}
                    discrete={true}
                />

            </View>

有没有办法阻止拖拽事件被模态拾取?

谢谢

解决方法

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

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

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

相关问答

错误1:Request method ‘DELETE‘ not supported 错误还原:...
错误1:启动docker镜像时报错:Error response from daemon:...
错误1:private field ‘xxx‘ is never assigned 按Alt...
报错如下,通过源不能下载,最后警告pip需升级版本 Requirem...