Skip to content

Commit

Permalink
Merge pull request #3 from AtomicJon/master
Browse files Browse the repository at this point in the history
Disregard passed color during interaction to avoid sync issues
  • Loading branch information
AtomicJon authored Aug 18, 2020
2 parents 5ac9090 + 3bdfcb3 commit 92c4fee
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@super-effective/react-color-picker",
"version": "1.1.1",
"version": "1.1.2",
"description": "React Color Picker",
"keywords": [
"react",
Expand Down
2 changes: 1 addition & 1 deletion src/ReactColorPicker.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ const ReactColorPicker = ({

// Update color when the passed value changes
useEffect(() => {
if (color !== hexRef.current) {
if (color !== hexRef.current && !isInteracting) {
const sanitizedHex = sanitizeHex(color || '#000000');
setColorFromHex(sanitizedHex);
}
Expand Down

0 comments on commit 92c4fee

Please sign in to comment.