Skip to content

Commit

Permalink
chore: fix formatting errors
Browse files Browse the repository at this point in the history
  • Loading branch information
crutchcorn committed Oct 30, 2023
1 parent 73f47a7 commit 19ac12f
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions packages/react-form/src/useField.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,9 @@ export function useField<
TName,
ValidatorType,
FormValidator
// Omit<typeof opts, 'onMount'> & {
// form: FormApi<TParentData>
// }
// Omit<typeof opts, 'onMount'> & {
// form: FormApi<TParentData>
// }
> {
// Get the form API either manually or from context
const { formApi, parentFieldName } = useFormContext()
Expand Down Expand Up @@ -90,8 +90,8 @@ export function useField<
fieldApi.store,
opts.mode === 'array'
? (state) => {
return [state.meta, Object.keys(state.value).length]
}
return [state.meta, Object.keys(state.value).length]
}
: undefined,
)
// Instantiates field meta and removes it when unrendered
Expand All @@ -112,13 +112,13 @@ type FieldComponentProps<
) => any
} & (TParentData extends any[]
? {
name?: TName
index: number
}
name?: TName
index: number
}
: {
name: TName
index?: never
}) &
name: TName
index?: never
}) &
Omit<
UseFieldOptions<TParentData, TName, ValidatorType, FormValidator>,
'name' | 'index'
Expand Down

0 comments on commit 19ac12f

Please sign in to comment.