fix : color picker absoulute bug
This commit is contained in:
@@ -88,6 +88,7 @@ import {
|
||||
} from "@/components/ui/popover";
|
||||
import {
|
||||
ColorPicker,
|
||||
ColorPickerEyeDropper,
|
||||
ColorPickerHue,
|
||||
ColorPickerSelection,
|
||||
} from "@/components/ui/color-picker";
|
||||
@@ -571,7 +572,7 @@ function ColorField({
|
||||
}) {
|
||||
const invalid = !normalizeHex(value);
|
||||
const handlePickerChange = useCallback(
|
||||
(color: number[] | Record<string, number>) => {
|
||||
(color: unknown) => {
|
||||
if (!Array.isArray(color)) return;
|
||||
const hex = color
|
||||
.slice(0, 3)
|
||||
@@ -610,6 +611,7 @@ function ColorField({
|
||||
>
|
||||
<ColorPickerSelection className="h-32" />
|
||||
<ColorPickerHue />
|
||||
<ColorPickerEyeDropper aria-label="ดูดสีจากหน้าจอ" />
|
||||
</ColorPicker>
|
||||
</PopoverContent>
|
||||
</Popover>
|
||||
|
||||
Reference in New Issue
Block a user