docs: react hooks - update useForm import path (#10658)

The `addFieldRow` / `removeFieldRow` / `replaceFieldRow` code examples
in the docs drawers still used the v2(?) import paths for `useForm`.

https://payloadcms.com/docs/admin/hooks#useform
This commit is contained in:
Boyan Bratvanov
2025-01-18 16:32:53 +02:00
committed by GitHub
parent b6e9c3bd4c
commit ef44bddca9

View File

@@ -386,7 +386,7 @@ The `useForm` hook returns an object with the following properties:
\`\`\`tsx
import { useForm } from "payload/components/forms";
import { useForm } from "@payloadcms/ui"
export const CustomArrayManager = () => {
const { addFieldRow } = useForm()
@@ -488,7 +488,7 @@ const ExampleCollection = {
\`\`\`tsx
import { useForm } from "payload/components/forms";
import { useForm } from "@payloadcms/ui"
export const CustomArrayManager = () => {
const { removeFieldRow } = useForm()
@@ -589,7 +589,7 @@ const ExampleCollection = {
\`\`\`tsx
import { useForm } from "payload/components/forms";
import { useForm } from "@payloadcms/ui"
export const CustomArrayManager = () => {
const { replaceFieldRow } = useForm()