Here in my colorpicker.jsx i have HexColorPicker and an input which shows hex code. I am able to use HexColorPicker but unable to use input. I have used this colorpicker inside and dialog which is I think is issue. If use this colorpicker outside dialog it is working but not inside dialog.
//colorpicker.jsx
<Popover onOpenChange={setOpen} open={open}>
<PopoverTrigger asChild disabled={disabled} onBlur={onBlur}>
<Button
{...props}
className={cn('block', className)}
name={name}
onClick={() => setOpen(true)}
size="icon"
style={{ backgroundColor: parsedValue }}
variant="outline"
>
<div />
</Button>
</PopoverTrigger>
<PopoverContent className="w-full" style={{ pointerEvents: "auto" }}>
<HexColorPicker color={parsedValue} onChange={onChange} />
<Input
maxLength={7}
onChange={(e) => onChange(e.currentTarget.value)}
ref={ref}
value={parsedValue}
/>
</PopoverContent>
</Popover>
Here adding style={{ pointerEvents: "auto" }}
on PopoverContent makes HexColorPicker usable but input is still not working.
Here is my dialog
<Dialog>
<DialogTrigger asChild>
<Button variant="secondary">QR Design Options</Button>
</DialogTrigger>
<DialogContent className="lg:max-w-[1000px] lg:max-h-[560px] overflow-hidden absolute"
onInteractOutside={(e) => { e.preventDefault(); }}>
<ColorPicker name="qrColor" className="mt-2 w-8 h-8 rounded-lg items-center"
value={designQRColor}
onChange={(v) => {
setQRColor(v);
setOptions((options) => ({
...options,
dotsOptions: {
...options.dotsOptions,
color: v,
},
}));
}}
/>
</DialogContent>
</Dialog>
`