Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lable improperly rendered for collapsible sub-fields in bulkEdit view #10757

Open
wrobson-lllow opened this issue Jan 23, 2025 · 1 comment
Open
Assignees
Labels

Comments

@wrobson-lllow
Copy link

Link to reproduction

https://github.com/wrobson-lllow/payload/tree/wr-collapsibleField-bulkEdit-label

Describe the Bug

According to the docs, Collapsible fields should be presentational only. However, when using the editMany/bulkEdit feature of a collections list view fields contained within a Collapsible are being displayed as if they were nested (like how a group field is displayed/labeled) i.e. {collapsible label} > {innerField label}. While this on it's own is not a huge issue on it's own the main issue is when using a function for the label definition in the collapsible's field config.

 {
      type: 'collapsible',
      label: 'Collapsible One',
      fields: [
        {
          name: 'textField',
          type: 'text',
        },
      ],
    },
    {
      type: 'collapsible',
      label: ({ data }) => `Collapsible Two - ${data.selectField}`,
      fields: [
        {
          name: 'selectField',
          type: 'select',
          options: ['A', 'B', 'C'],
        },
      ],
    },

These two fields are rendered as shown in the screenshot below:

Image

To Reproduce

In the included Reproduction repo:

  • Start Project with pnpm dev _community
  • Navigate to admin panel
  • Create a new record in the "Examples" collection
  • Return to list view of "Examples" collection
  • Select a record and click "Edit"
  • Open the "Select a value" menu

Payload Version

2.32.0

Adapters and Plugins

No response

@wrobson-lllow wrobson-lllow added status: needs-triage Possible bug which hasn't been reproduced yet v2 labels Jan 23, 2025
@wrobson-lllow
Copy link
Author

I created PR 10760 that could be a potential resolution to this issue.

This solution removes the collapsible label from the Field Select 'Combined Label' altogether.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants