casesandberg / casesandberg/react-color

Sketch Picker does not reflect color change on click nor drag

Open
#761 6 comments 3 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
12.3k
Forks
920
PR merge metrics
No merged PRs in 30d

Description

Hi
I am unable to pick color and values doesn't change, I am attaching code snippet and image, this bug raised recently using react 16.12.0 version.

![ezgif com-video-to-gif (1)](https://user-images.githubusercontent.com/52664969/92929001-7d53c800-f45d-11ea-92a7-2131cc527910.gif)

onComplete = (param) => {
const hexVal = param.hex || param.target.value;
this.props.brandingColor.originalHexColorCode = this.props.brandingColor.hexColorCode;
this.props.brandingColor.hexColorCode = hexVal;
this.setState({ color: param.rgb });
this.props.updateColor(this.props.colors, this.props.brandingColor);
};

SketchPicker
color={this.state.color}
onChangeComplete={this.onComplete}
disableAlpha={true}
presetColors={this.getHexValues()}
/>

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the SketchPicker issue with React 16.12.0, using the provided onChangeComplete callback, color prop, and animated example. Trace whether click and drag events update the picker values and displayed color; done means both interactions visibly update the selected color and callback values.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, react
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.