diff --git a/src/Inputs/Input.tsx b/src/Inputs/Input.tsx index 6b16a67..83989f3 100644 --- a/src/Inputs/Input.tsx +++ b/src/Inputs/Input.tsx @@ -20,7 +20,7 @@ const Input = React.forwardRef(( name={ inputName } id={ inputId } value={ value } - onChange={ e => setValue(e.target.value) } + onChange={ (e: React.ChangeEvent) => setValue(e.target.value) } ref={ ref } { ...props } /> diff --git a/src/useInertiaForm.ts b/src/useInertiaForm.ts index 5a09aae..8b3a1d9 100644 --- a/src/useInertiaForm.ts +++ b/src/useInertiaForm.ts @@ -44,7 +44,7 @@ type getErrorByPath = (field: Path) => string|string[]|undefined type getErrorByString = (field: string) => string|string[]|undefined export interface UseInertiaFormProps { - data: TForm|undefined + data: TForm isDirty: boolean errors: Partial> hasErrors: boolean