Custom block row labels defined on `admin.components.Label` were not rendering despite existing in the config. Instead, if a custom label component was defined on the _top-level_ blocks field itself, it was incorrectly replacing each blocks label _in addition_ to the field's label. Now, custom labels defined at the field-level now only replace the field's label as expected, and custom labels defined at the block-level are now supported as the types suggest.
8 lines
227 B
TypeScript
8 lines
227 B
TypeScript
import type { BlockRowLabelServerComponent } from 'payload'
|
|
|
|
const CustomBlockLabel: BlockRowLabelServerComponent = ({ rowLabel }) => {
|
|
return <div>{`Custom Block Label: ${rowLabel}`}</div>
|
|
}
|
|
|
|
export default CustomBlockLabel
|