payloadcms / payload

Payload is the open-source, fullstack Next.js framework, giving you instant backend superpowers. Get a full TypeScript backend and admin panel instantly. Use Payload as a headless CMS or for building powerful applications.
https://payloadcms.com
MIT License
23.58k stars 1.5k forks source link

initCollapsed: true not working #7954

Closed aaaltonen closed 1 month ago

aaaltonen commented 1 month ago

Link to reproduction

No response

Environment Info

Binaries:
  Node: 20.10.0
  npm: 10.2.5
  Yarn: 1.22.22
  pnpm: 8.12.1
Relevant Packages:
  payload: 3.0.0-beta.94
  next: 15.0.0-canary.132
  @payloadcms/db-postgres: 3.0.0-beta.94
  @payloadcms/email-nodemailer: 3.0.0-beta.91
  @payloadcms/graphql: 3.0.0-beta.91
  @payloadcms/live-preview: 0.2.2
  @payloadcms/live-preview-react: 3.0.0-beta.94
  @payloadcms/next/utilities: 3.0.0-beta.94
  @payloadcms/plugin-cloud: 3.0.0-beta.94
  @payloadcms/plugin-cloud-storage: 3.0.0-beta.91
  @payloadcms/richtext-lexical: 3.0.0-beta.94
  @payloadcms/storage-s3: 3.0.0-beta.94
  @payloadcms/translations: 3.0.0-beta.91
  @payloadcms/ui/shared: 3.0.0-beta.91
  react: 19.0.0-rc-eb3ad065-20240822
  react-dom: 19.0.0-rc-eb3ad065-20240822
Operating System:
  Platform: darwin
  Arch: arm64
  Version: Darwin Kernel Version 23.5.0: Wed May  1 20:13:18 PDT 2024; root:xnu-10063.121.3~5/RELEASE_ARM64_T6030
  Available memory (MB): 18432
  Available CPU cores: 12

Describe the Bug

Adding following code from documentation has no effects on blocks:

admin: { initCollapsed: true, },

Reproduction Steps

  1. Create block
  2. Add initCollapsed: true to admin prop
  3. Go to admin panel and see results

Adapters and Plugins

No response

paulpopus commented 1 month ago

It's working for me image

Though please note that those admin settings are specifically for the type: 'blocks' field itself, not for individual blocks. You'll see a type error when adding them to individual blocks as that's not supported right now.

It could also be that your user preferences are being saved, so I would make sure those are cleared out from your database if you see them persist in a specific state.

github-actions[bot] commented 3 weeks ago

This issue has been automatically locked. Please open a new issue if this issue persists with any additional detail.