casesandberg / casesandberg/react-color

How can I get unique data-id in event so that respective state can be updated using that id?

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

Description

I want to specify a unique id to each SketchPicker so that I can setState on basis of id.
But I'm unable to get this id in the event!

```
handleTxtColorChange = (color: any, event: any): void => {
console.log(event);
this.setState({ metricTextColor: color.hex });
}

{this.state.conditions.map((condition, key) => (

)}
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.