I'm trying to add a onChange event to my input field component but when I the onChange evenet handler I can no longer type in my input component this is my input props interface
export interface InputFieldProps {
className?: string;
label?: string;
InputType?: 'email' | 'password' | 'search';
placeholder?: string;
onChange?: (e: React.ChangeEvent<HTMLInputElement>) => void;
}
and this is my component call
<InputField
label="Email"
InputType="email"
className="firstInput"
placeholder="Email"
onChange={(e) => {
setEmail(e.target.value);
}}
/>
and this is where I'm adding the prop onChange in my component (couldn't add code because it's too long)
