-
-
Notifications
You must be signed in to change notification settings - Fork 96
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Color pointer not resetting after color change #193
Comments
Hi Grant! Are you good? Hope you going well! This can be solved by adding hex color instead of the color name. You are importing a component that handles with hex color only. const Panel = () => {
const [color, setColor] = useState("#ffffff");
const handleColorChange = (color) => setColor(color)
return (
<>
<HexColorPicker color={color} onChange={handleColorChange} />
<button onClick={() => setColor("#ffffff")}>Reset</button>
</>
)
}
export default Panel |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I am trying to reset the color pointer button after I click a button but the pointer remains the previously selected color.
In the example below I expect the color pointer to change to white (not green, and be in the correct position) after the Set button is clicked.
What am I doing wrong?
The text was updated successfully, but these errors were encountered: