fields`,
+ value: "**`fields`**",
},
{
value: "Deprecated. This property cannot be relied on as up-to-date.",
@@ -187,7 +187,7 @@ The `useForm` hook returns an object with the following properties:
],
[
{
- value: `submit`,
+ value: "**`submit`**",
},
{
value: "Method to trigger the form to submit",
@@ -198,7 +198,7 @@ The `useForm` hook returns an object with the following properties:
],
[
{
- value: `dispatchFields`,
+ value: "**`dispatchFields`**",
},
{
value: "Dispatch actions to the form field state",
@@ -209,7 +209,7 @@ The `useForm` hook returns an object with the following properties:
],
[
{
- value: `validateForm`,
+ value: "**`validateForm`**",
},
{
value: "Trigger a validation of the form state",
@@ -220,10 +220,10 @@ The `useForm` hook returns an object with the following properties:
],
[
{
- value: `createFormData`,
+ value: "**`createFormData`**",
},
{
- value: `<>Create a multipart/form-data object from the current form's state>`,
+ value: "Create a `multipart/form-data` object from the current form's state",
},
{
value: ''
@@ -231,7 +231,7 @@ The `useForm` hook returns an object with the following properties:
],
[
{
- value: `disabled`,
+ value: "**`disabled`**",
},
{
value: "Boolean denoting whether or not the form is disabled",
@@ -242,7 +242,7 @@ The `useForm` hook returns an object with the following properties:
],
[
{
- value: `getFields`,
+ value: "**`getFields`**",
},
{
value: 'Gets all fields from state',
@@ -253,7 +253,7 @@ The `useForm` hook returns an object with the following properties:
],
[
{
- value: `getField`,
+ value: "**`getField`**",
},
{
value: 'Gets a single field from state by path',
@@ -264,7 +264,7 @@ The `useForm` hook returns an object with the following properties:
],
[
{
- value: `getData`,
+ value: "**`getData`**",
},
{
value: 'Returns the data stored in the form',
@@ -275,7 +275,7 @@ The `useForm` hook returns an object with the following properties:
],
[
{
- value: `getSiblingData`,
+ value: "**`getSiblingData`**",
},
{
value: 'Returns form sibling data for the given field path',
@@ -286,10 +286,10 @@ The `useForm` hook returns an object with the following properties:
],
[
{
- value: `setModified`,
+ value: "**`setModified`**",
},
{
- value: `<>Set the form\'s modified state>`,
+ value: "Set the form\'s `modified` state",
},
{
value: '',
@@ -297,10 +297,10 @@ The `useForm` hook returns an object with the following properties:
],
[
{
- value: `setProcessing`,
+ value: "**`setProcessing`**",
},
{
- value: `<>Set the form\'s processing state>`,
+ value: "Set the form\'s `processing` state",
},
{
value: '',
@@ -308,10 +308,10 @@ The `useForm` hook returns an object with the following properties:
],
[
{
- value: `setSubmitted`,
+ value: "**`setSubmitted`**",
},
{
- value: `<>Set the form\'s submitted state>`,
+ value: "Set the form\'s `submitted` state",
},
{
value: '',
@@ -319,7 +319,7 @@ The `useForm` hook returns an object with the following properties:
],
[
{
- value: `formRef`,
+ value: "**`formRef`**",
},
{
value: 'The ref from the form HTML element',
@@ -330,7 +330,7 @@ The `useForm` hook returns an object with the following properties:
],
[
{
- value: `reset`,
+ value: "**`reset`**",
},
{
value: 'Method to reset the form to its initial state',
@@ -341,7 +341,7 @@ The `useForm` hook returns an object with the following properties:
],
[
{
- value: `addFieldRow`,
+ value: "**`addFieldRow`**",
},
{
value: "Method to add a row on an array or block field",
@@ -351,7 +351,6 @@ The `useForm` hook returns an object with the following properties:
drawerDescription: 'A useful method to programmatically add a row to an array or block field.',
drawerSlug: 'addFieldRow',
drawerContent: `
-<>
path,
+ value: "**\`path\`**",
},
{
value: "The path to the array or block field",
@@ -368,7 +367,7 @@ The `useForm` hook returns an object with the following properties:
],
[
{
- value: rowIndex,
+ value: "**\`rowIndex\`**",
},
{
value: "The index of the row to add. If omitted, the row will be added to the end of the array.",
@@ -376,7 +375,7 @@ The `useForm` hook returns an object with the following properties:
],
[
{
- value: data,
+ value: "**\`data<\`**",
},
{
value: "The data to add to the row",
@@ -385,13 +384,8 @@ The `useForm` hook returns an object with the following properties:
]}
/>
-{' '}
-
+\`\`\`tsx
{\`import { useForm } from "payload/components/forms";
export const CustomArrayManager = () => {
@@ -416,10 +410,11 @@ export const CustomArrayManager = () => {
)
}\`}
-
+\`\`\`
- An example config to go along with the Custom Component
-
+An example config to go along with the Custom Component
+
+\`\`\`tsx
{\`const ExampleCollection = {
slug: "example-collection",
fields: [
@@ -444,14 +439,13 @@ export const CustomArrayManager = () => {
},
],
}\`}
-
->
- `
+\`\`\`
+`
}
],
[
{
- value: `removeFieldRow`,
+ value: "**`removeFieldRow`**",
},
{
value: "Method to remove a row from an array or block field",
@@ -461,7 +455,6 @@ export const CustomArrayManager = () => {
drawerDescription: 'A useful method to programmatically remove a row from an array or block field.',
drawerSlug: 'removeFieldRow',
drawerContent: `
-<>
path,
+ value: "**\`path\`**",
},
{
value: "The path to the array or block field",
@@ -478,7 +471,7 @@ export const CustomArrayManager = () => {
],
[
{
- value: rowIndex,
+ value: "**\`rowIndex\`**",
},
{
value: "The index of the row to remove",
@@ -487,13 +480,9 @@ export const CustomArrayManager = () => {
]}
/>
-{' '}
-
+\`\`\`tsx
{\`import { useForm } from "payload/components/forms";
export const CustomArrayManager = () => {
@@ -513,10 +502,11 @@ export const CustomArrayManager = () => {
)
}\`}
-
+\`\`\`
- An example config to go along with the Custom Component
-
+An example config to go along with the Custom Component
+
+\`\`\`tsx
{\`const ExampleCollection = {
slug: "example-collection",
fields: [
@@ -541,14 +531,13 @@ export const CustomArrayManager = () => {
},
],
}\`}
-
->
- `
+\`\`\`
+`
}
],
[
{
- value: `replaceFieldRow`,
+ value: "**`replaceFieldRow`**",
},
{
value: "Method to replace a row from an array or block field",
@@ -558,7 +547,6 @@ export const CustomArrayManager = () => {
drawerDescription: 'A useful method to programmatically replace a row from an array or block field.',
drawerSlug: 'replaceFieldRow',
drawerContent: `
-<>
path,
+ value: "**\`path\`**",
},
{
value: "The path to the array or block field",
@@ -575,7 +563,7 @@ export const CustomArrayManager = () => {
],
[
{
- value: rowIndex,
+ value: "**\`rowIndex\`**",
},
{
value: "The index of the row to replace",
@@ -583,7 +571,7 @@ export const CustomArrayManager = () => {
],
[
{
- value: data,
+ value: "**\`data\`**",
},
{
value: "The data to replace within the row",
@@ -592,13 +580,10 @@ export const CustomArrayManager = () => {
]}
/>
-{' '}
-
+\`\`\`tsx
{\`import { useForm } from "payload/components/forms";
export const CustomArrayManager = () => {
@@ -623,10 +608,11 @@ export const CustomArrayManager = () => {
)
}\`}
-
+\`\`\`
- An example config to go along with the Custom Component
-
+An example config to go along with the Custom Component
+
+\`\`\`tsx
{\`const ExampleCollection = {
slug: "example-collection",
fields: [
@@ -651,8 +637,7 @@ export const CustomArrayManager = () => {
},
],
}\`}
-
->
+\`\`\`
`
}
],
diff --git a/docs/rest-api/overview.mdx b/docs/rest-api/overview.mdx
index 962acbba2a..45bd7709db 100644
--- a/docs/rest-api/overview.mdx
+++ b/docs/rest-api/overview.mdx
@@ -51,28 +51,15 @@ Note: Collection slugs must be formatted in kebab-case
},
},
drawerContent: `
- <>
- find query parametersfind endpoint supports the following additional query parameters:
-
- >
- `,
+#### Additional `find` query parameters
+
+The `find` endpoint supports the following additional query parameters:
+
+- [sort](/docs/queries/overview#sort) - sort by field
+- [where](/docs/queries/overview) - pass a where query to constrain returned documents
+- [limit](/docs/queries/pagination#pagination-controls) - limit the returned documents to a certain number
+- [page](/docs/queries/pagination#pagination-controls) - get a specific page of documents
+ `
},
},
{