问题描述
我正在使用标准的 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 (将#修改为@)