-
-
Notifications
You must be signed in to change notification settings - Fork 2k
BUG: REACT HOOK FORM register type max input is a number ERROR #4566
Copy link
Copy link
Closed
Description
- [x ] Check if updating to the latest Preact version resolves the issue
Describe the bug
React hook form method register have a type max input like number and input preact is Signalish<string | undefined> .
import { useForm } from "react-hook-form";
export function App() {
const { register } = useForm<{ name: string }>();
return (
<>
<input type="text" {...register("name")} />
</>
);
}To Reproduce
https://codesandbox.io/p/sandbox/error-input-react-hook-form-y8rprh
Steps to reproduce the behavior:
- example but no show error, but in vite js it happen
- npm init vite@latest app
- choose preact typescript and install dependencies.
- install react hook form
SOLUTION
Expected behavior
the solution is that min and max add number
min?: Signalish<string | undefined|number>;
MAX?: Signalish<string | undefined|number>;
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels