Describe the Bug
When an array field contains only a single group field that includes conditional fields using admin.condition, the array items inside a collapsible do not render correctly on the first expand after page load.
On the first expand, the array row appears empty sometimes.
If the collapsible is closed and opened again, the content renders correctly.
Link to the code that reproduces this issue
https://github.com/kubyshkin-vladyslav/payload-collapsible-array-bug
Reproduction Steps
- Clone the repository:
git clone https://github.com/kubyshkin-vladyslav/payload-collapsible-array-bug
- Navigate into the project and copy environment variables:
cd payload-collapsible-array-bug
cp .env.example .env
- Start MongoDB:
docker compose up -d mongo
- Install dependencies and start the dev server:
- Open
http://localhost:3000/admin in your browser and create the first admin user when prompted.
- Open
http://localhost:3000/admin/globals/header in your browser
- In both main and secondary tabs create at least 10
Nav Items.
- Collapse all array items (so their collapsed state is stored in preferences).
- Refresh the page.
- Expand items one by one.
Observed behavior:
- Some items expand empty on first open
- If you click “Show all”, there is a higher chance that multiple items expand empty
- Collapse and expand the same item again - the content renders correctly.
Which area(s) are affected?
area: ui
Environment Info
Binaries:
Node: 22.20.0
npm: N/A
Yarn: N/A
pnpm: N/A
Relevant Packages:
payload: 3.76.1
next: 15.4.11
@payloadcms/db-mongodb: 3.76.1
@payloadcms/graphql: 3.76.1
@payloadcms/next/utilities: 3.76.1
@payloadcms/richtext-lexical: 3.76.1
@payloadcms/translations: 3.76.1
@payloadcms/ui/shared: 3.76.1
react: 19.2.1
react-dom: 19.2.1
Operating System:
Platform: win32
Arch: x64
Version: Windows 11 Pro
Available memory (MB): 32545
Available CPU cores: 20
Describe the Bug
When an array field contains only a single group field that includes conditional fields using admin.condition, the array items inside a collapsible do not render correctly on the first expand after page load.
On the first expand, the array row appears empty sometimes.
If the collapsible is closed and opened again, the content renders correctly.
Link to the code that reproduces this issue
https://github.com/kubyshkin-vladyslav/payload-collapsible-array-bug
Reproduction Steps
cd payload-collapsible-array-bug cp .env.example .envhttp://localhost:3000/adminin your browser and create the first admin user when prompted.http://localhost:3000/admin/globals/headerin your browserNav Items.Observed behavior:
Which area(s) are affected?
area: ui
Environment Info