Closed Neha1405 closed 4 years ago
Thanks for the issue. If you can provide me with more information about the error (i.e. code snippets that cause the error / screenshots), I might be able to help you out.
Actully I want only the color slider with tap and drag feature.
<HsvColorPicker ref={ref => { this.pickerColor = ref; }} huePickerHue={hue} onHuePickerDragMove={this.onHuePickerChange} onHuePickerPress={this.onHuePickerChange} satValPickerHue={hue} satValPickerSaturation={sat} satValPickerValue={val} satValPickerSize={0} satValPickerSliderSize={0} onSatValPickerDragMove={this.onSatValPickerChange} onSatValPickerPress={this.onSatValPickerChange} huePickerSliderSize={20} />
On drag on the slider, the color should be changed and for that, I have used the onHuePickerDragMove method. But it's not dragging and changing the color. Only the onHuePickerPress method is working.
If you only want the slider, you can do
import HuePicker from 'react-native-hsv-color-picker/src/HuePicker'
check out this file for the supported props.
Thanks for the help.
But the slider(Dot) is not moving.
<HuePicker hue={hue} onDragMove={this.onHuePickerChange} onDragStart={this.onHuePickerChange} sliderSize={15} onPress={this.onHuePickerChange} /> //Method onHuePickerChange({ hue }) { this.setState({ hue, }); }
What I would suggest is to print out the hue
value in your method or try to change the hue
value of the component manually to see if the slider is moving or not. If it is still not working, I'll take a look.
@yuanfux See here is the video, you will better understand my issue. When I try to move the slider (Dot) it's not moving the position, but the color is changing.
I was on a vocation, sorry for the late replay. This is a confirmed bug related to this React Native issue https://github.com/facebook/react-native/issues/27003. This bug should be fixed in the lastest release. I really appreaciate for the issue. If you found more bugs please let me know. Have a good one.
onHuePickerDragMove method not working