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:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user