setValue() to custom file input not working with react hook form ? #9240
Unanswered
ahmedShawareb567
asked this question in
General
Replies: 1 comment
-
@ahmedShawareb567 : Please provide a codesandbox url to re-produce the issue. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
import { forwardRef, useEffect, useState } from "react";
import { AppImage } from "../AppImage/Index";
import { SvgIcon } from "../SvgIcon/Index";
import "./imageInput.scss";
interface ImageInputInterfaceProps {
onChange: (e) => void;
onBlur: (e) => void;
name: string;
}
export const ImageInput = forwardRef<
HTMLInputElement,
ImageInputInterfaceProps
const randomId = Date.now();
useEffect(() => {}, []);
return (
<label
className="imageInput-container"
htmlFor={
imageInput-${randomId}
}>
اختيار الملف
{placeHolder}
);
});
ImageInput.defaultProps = {
onChange: () => {},
onBlur: () => {},
name: "image-input",
};
Beta Was this translation helpful? Give feedback.
All reactions