Fixed multi color picker not working
This commit is contained in:
@@ -53,12 +53,10 @@ export function MultiColorPicker(props: {
|
|||||||
}
|
}
|
||||||
>
|
>
|
||||||
<ColorPicker
|
<ColorPicker
|
||||||
format="hex"
|
|
||||||
value={value}
|
value={value}
|
||||||
onChange={(_, newHex) => {
|
onChange={(clr) => {
|
||||||
if (props.onChange) {
|
if (props.onChange) {
|
||||||
newHex = newHex.replace("#", "");
|
props.onChange(values.map((v, i) => (i === idx ? clr.toHex() : v)).join(","));
|
||||||
props.onChange(values.map((v, i) => (i === idx ? newHex : v)).join(","));
|
|
||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
|
|||||||
Reference in New Issue
Block a user