Fixed multi color picker not working

This commit is contained in:
Donkie
2024-08-08 23:02:11 +02:00
parent c93ca5d916
commit eee36fad66

View File

@@ -53,12 +53,10 @@ export function MultiColorPicker(props: {
}
>
<ColorPicker
format="hex"
value={value}
onChange={(_, newHex) => {
onChange={(clr) => {
if (props.onChange) {
newHex = newHex.replace("#", "");
props.onChange(values.map((v, i) => (i === idx ? newHex : v)).join(","));
props.onChange(values.map((v, i) => (i === idx ? clr.toHex() : v)).join(","));
}
}}
/>