Skip to content

docs: correct type name in editMenuItems client component example#15904

Merged
GermanJablo merged 2 commits intomainfrom
copilot/fix-edit-view-menu-item-type
Mar 13, 2026
Merged

docs: correct type name in editMenuItems client component example#15904
GermanJablo merged 2 commits intomainfrom
copilot/fix-edit-view-menu-item-type

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 11, 2026

The editMenuItems client component example in docs/custom-components/edit-view.mdx referenced a non-existent type EditViewMenuItemClientProps. The correct exported type is EditMenuItemsClientProps.

Changes

  • docs/custom-components/edit-view.mdx: Replace EditViewMenuItemClientPropsEditMenuItemsClientProps in the client component code example (import and props type annotation)

The server component example already correctly used EditMenuItemsServerProps; the client example now follows the same naming pattern:

import type { EditMenuItemsClientProps } from 'payload'

export const EditMenuItems = (props: EditMenuItemsClientProps) => {
  // ...
}
Original prompt

This section details on the original issue you should resolve

<issue_title>Change EditViewMenuItemClientProps to EditViewMenuItemsClientProps</issue_title>
<issue_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.</issue_description>

Comments on the Issue (you are @copilot in this section)


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

…Props in edit-view.mdx

Co-authored-by: GermanJablo <43938777+GermanJablo@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix type reference in Edit View documentation fix(docs): correct type name in editMenuItems client component example Mar 11, 2026
@GermanJablo GermanJablo marked this pull request as ready for review March 11, 2026 11:32
@GermanJablo GermanJablo enabled auto-merge (squash) March 11, 2026 11:32
@github-actions
Copy link
Copy Markdown
Contributor

Pull Request titles must follow the Conventional Commits specification and have valid scopes.

Unknown scope "docs" found in pull request title "fix(docs): correct type name in editMenuItems client component example". Scope must match one of: cpa, claude, db-*, db-d1-sqlite, db-mongodb, db-postgres, db-vercel-postgres, db-sqlite, db-d1-sqlite, drizzle, email-*, email-nodemailer, email-resend, eslint, graphql, kv, kv-redis, live-preview, live-preview-react, live-preview-vue, next, payload-cloud, plugin-cloud, plugin-cloud-storage, plugin-ecommerce, plugin-form-builder, plugin-import-export, plugin-mcp, plugin-multi-tenant, plugin-nested-docs, plugin-redirects, plugin-search, plugin-sentry, plugin-seo, plugin-stripe, richtext-*, richtext-lexical, richtext-slate, sdk, storage-*, storage-azure, storage-gcs, storage-r2, storage-uploadthing, storage-vercel-blob, storage-s3, translations, ui, templates, examples(/(\w|-)+)?, deps.

feat(ui): add Button component
^    ^    ^
|    |    |__ Subject
|    |_______ Scope
|____________ Type

@GermanJablo GermanJablo changed the title fix(docs): correct type name in editMenuItems client component example docs: correct type name in editMenuItems client component example Mar 11, 2026
@GermanJablo GermanJablo disabled auto-merge March 11, 2026 11:33
@GermanJablo GermanJablo enabled auto-merge (squash) March 11, 2026 11:56
@GermanJablo GermanJablo merged commit 03b20d0 into main Mar 13, 2026
20 of 22 checks passed
@GermanJablo GermanJablo deleted the copilot/fix-edit-view-menu-item-type branch March 13, 2026 17:32
@github-actions
Copy link
Copy Markdown
Contributor

🚀 This is included in version v3.79.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Change EditViewMenuItemClientProps to EditViewMenuItemsClientProps

3 participants