We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 09ed844 commit 92627a7Copy full SHA for 92627a7
1 file changed
packages/color-compact/src/index.tsx
@@ -93,7 +93,7 @@ const Compact = React.forwardRef<HTMLDivElement, CompactProps<React.MouseEvent<H
93
} = props;
94
const hsva = (typeof color === 'string' && validHex(color) ? hexToHsva(color) : color) as HsvaColor;
95
const hex = color ? hsvaToHex(hsva).replace(/^#/, '') : '';
96
- const handleChangeCallback = useCallback((hsv: HsvaColor) => onChange && onChange(handleColor(hsv)), []);
+ const handleChangeCallback = useCallback((hsv: HsvaColor) => onChange && onChange(handleColor(hsv)), [onChange]);
97
const handleHex = (value: string | number, evn: React.ChangeEvent<HTMLInputElement>) => {
98
if (typeof value === 'string' && validHex(value) && /(3|6)/.test(String(value.length))) {
99
handleChangeCallback(hexToHsva(value));
0 commit comments