MCPcopy Create free account
hub / github.com/code-with-antonio/nodebase / FormField

Function FormField

src/components/ui/form.tsx:32–43  ·  view source on GitHub ↗
({
  ...props
}: ControllerProps<TFieldValues, TName>)

Source from the content-addressed store, hash-verified

30)
31
32const FormField = <
33 TFieldValues extends FieldValues = FieldValues,
34 TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>,
35>({
36 ...props
37}: ControllerProps<TFieldValues, TName>) => {
38 return (
39 <FormFieldContext.Provider value={{ name: props.name }}>
40 <Controller {...props} />
41 </FormFieldContext.Provider>
42 )
43}
44
45const useFormField = () => {
46 const fieldContext = React.useContext(FormFieldContext)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected