-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Open
Description
Documentation Issue
The code example at Edit View > Custom Components > editMenuItems > Client Component refers to a type "EditViewMenuItemClientProps" twice. This type doesn't exist, it should be EditViewMenuItem**s**ClientProps.
'use client'
import React from 'react'
import { PopupList } from '@payloadcms/ui'
import type { EditViewMenuItemClientProps } from 'payload'
export const EditMenuItems = (props: EditViewMenuItemClientProps) => {
const handleClick = () => {
console.log('Custom button clicked!')
}
return (
<PopupList.ButtonGroup>
<PopupList.Button onClick={handleClick}>
Custom Edit Menu Item
</PopupList.Button>
<PopupList.Button onClick={handleClick}>
Another Custom Edit Menu Item - add as many as you need!
</PopupList.Button>
</PopupList.ButtonGroup>
)
}The server component gets it right.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels