Skip to content

Conversation

RasyadiAbdoellah
Copy link

Addresses #57. Changes the behaviour for the hex input so that the hex value will only change if the user tabs away from the input or if the user presses the enter key.

Added a local hexInput state that stores the input value for the hex text input. hexInput value also gets updated in a useEffect hook whenever the parent hex value changes.

Updating the parent hex value is moved to onBlur and OnKeyUp. A regex check was added to changeHex to ensure changeColor is only called if the hex value is valid.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant