({
...props
}: ControllerProps<TFieldValues, TName>)
| 29 | ) |
| 30 | |
| 31 | const FormField = < |
| 32 | TFieldValues extends FieldValues = FieldValues, |
| 33 | TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues> |
| 34 | >({ |
| 35 | ...props |
| 36 | }: ControllerProps<TFieldValues, TName>) => { |
| 37 | return ( |
| 38 | <FormFieldContext.Provider value={{ name: props.name }}> |
| 39 | <Controller {...props} /> |
| 40 | </FormFieldContext.Provider> |
| 41 | ) |
| 42 | } |
| 43 | |
| 44 | const useFormField = () => { |
| 45 | const fieldContext = React.useContext(FormFieldContext) |
nothing calls this directly
no outgoing calls
no test coverage detected