Type Aliases
Op
Ƭ Op:OperationReference<"public", any, any>
Not exported: an exported type refers to it.
ReactHookFormInput
Ƭ ReactHookFormInput:FieldValues & { [key: string]: Value | undefined; }
Editable input a draft can retain losslessly.
ReactHookFormBindingOptions
Ƭ ReactHookFormBindingOptions<O, Input, Context, Output>: Omit<UseOperationBindingOptions<O, Input, Output>, "editor"> & { form: Omit<UseFormProps<Input, Context, Output>, "values"> }
Type parameters
Functions
reactHookFormEditor
▸ reactHookFormEditor<Input, Context, Output>(form): OperationEditor<Input, Output>
Adapt a React Hook Form instance to the editor protocol. Submission runs
its own handleSubmit, so its submission state, focus and post-submit
revalidation are its own.
Type parameters
Parameters
Returns
OperationEditor<Input, Output>
useReactHookFormBinding
▸ useReactHookFormBinding<O, Input, Context, Output>(operation, options): Object
Create a React Hook Form and bind it to one recoverable operation request.
form is React Hook Form’s own instance, typed from its options: register
fields, render Controllers and read formState as usual. Its submitted
output, such as a resolver’s transformation, must satisfy the operation’s
arguments. isSubmitSuccessful describes the local submission; whether the
request was accepted is binding’s state.
Type parameters
Parameters
Returns
Object