From 182d5db6defe5b03488e5fc6541b0f553fa6eff5 Mon Sep 17 00:00:00 2001 From: ovalice <31350208+ovalice@users.noreply.github.com> Date: Wed, 1 May 2024 21:42:43 +0200 Subject: [PATCH] docs: Fix RowLabel code snippet that causes compilation error (#4947) Co-authored-by: smarten --- docs/fields/array.mdx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/fields/array.mdx b/docs/fields/array.mdx index f735fdf92a..8ea755bd28 100644 --- a/docs/fields/array.mdx +++ b/docs/fields/array.mdx @@ -67,6 +67,7 @@ properties: ```ts import { CollectionConfig } from 'payload/types' +import { RowLabelArgs } from 'payload/dist/admin/components/forms/RowLabel/types' export const ExampleCollection: CollectionConfig = { slug: 'example-collection', @@ -101,7 +102,7 @@ export const ExampleCollection: CollectionConfig = { ], admin: { components: { - RowLabel: ({ data, index }) => { + RowLabel: ({ data, index }: RowLabelArgs) => { return data?.title || `Slide ${String(index).padStart(2, '0')}` }, },