Skip to content

Commit

Permalink
fix: 🐛 Removes undefined option for data return value
Browse files Browse the repository at this point in the history
  • Loading branch information
aviemet committed Apr 8, 2023
1 parent 55fe582 commit 29a48e3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Inputs/Input.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const Input = React.forwardRef<HTMLInputElement, InputProps>((
name={ inputName }
id={ inputId }
value={ value }
onChange={ e => setValue(e.target.value) }
onChange={ (e: React.ChangeEvent<HTMLInputElement>) => setValue(e.target.value) }
ref={ ref }
{ ...props }
/>
Expand Down
2 changes: 1 addition & 1 deletion src/useInertiaForm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ type getErrorByPath<TForm> = (field: Path<TForm>) => string|string[]|undefined
type getErrorByString = (field: string) => string|string[]|undefined

export interface UseInertiaFormProps<TForm> {
data: TForm|undefined
data: TForm
isDirty: boolean
errors: Partial<Record<keyof TForm, string|string[]>>
hasErrors: boolean
Expand Down

0 comments on commit 29a48e3

Please sign in to comment.