Files
payload/test/fields/collections/Array/LabelComponent.tsx
Patrik a9b46a4d63 fix(ui): properly formats collapsible field IDs (#5435)
* test: passing collapsible fields test suite

* chore: passes indexPath into ArrayRow & updates path in collapsible field

* fix: collapsible paths and indexPath prop types

* chore: improves path and schemaPath syntax

* leftover

* chore: updates selectors in collapsibles tests

* chore: updates selector in live-preview test suite

---------

Co-authored-by: Jacob Fletcher <jacobsfletch@gmail.com>
2024-03-25 14:16:35 -04:00

14 lines
387 B
TypeScript

'use client'
import type { RowLabelComponent } from 'payload/types'
import { useRowLabel } from '@payloadcms/ui/forms/RowLabel/Context'
import React from 'react'
export const ArrayRowLabel: RowLabelComponent = () => {
const { data } = useRowLabel<{ title: string }>()
return (
<div style={{ color: 'coral', textTransform: 'uppercase' }}>{data.title || 'Untitled'}</div>
)
}