Skip to content

Commit

Permalink
Disregard passed color during interaction to avoid sync issues
Browse files Browse the repository at this point in the history
  • Loading branch information
AtomicJon committed Aug 18, 2020
1 parent 5ac9090 commit 3bdfcb3
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 3bdfcb3

Please sign in to comment.