Skip to content

Commit

Permalink
fix: emit new values for onChange and onChangeComplete
Browse files Browse the repository at this point in the history
  • Loading branch information
spezzino committed Sep 18, 2022
1 parent 974bd92 commit a9cf4f2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/context/useColor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@ export default function ColorProvider({
setColors(newColors);

onChangeComplete &&
debouncedChangeHandler(onChangeComplete, colors, event);
onChange && onChange(colors, event);
debouncedChangeHandler(onChangeComplete, newColors, event);
onChange && onChange(newColors, event);
}
}

Expand Down

0 comments on commit a9cf4f2

Please sign in to comment.