Skip to content

Commit

Permalink
Fix ColorPicker input field does not reset to empty when color is null
Browse files Browse the repository at this point in the history
ref DEV-1817
  • Loading branch information
louischan-oursky committed Aug 16, 2024
2 parents 7cf9657 + be9f2f8 commit 7ea4897
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions portal/src/components/design/ColorPicker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ export const ColorPicker: React.VFC<ColorPickerProps> = function ColorPicker(
useEffect(() => {
if (color != null) {
setInputValue(color);
} else {
setInputValue("");
}
}, [color]);

Expand Down

0 comments on commit 7ea4897

Please sign in to comment.