You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Nested Replicator inside Bard set remounts and resets collapsed state on field interaction #15687
When a Replicator (with collapse: true) lives inside a Bard set, interacting with nested fields (e.g. Grid stacked rows, nested Bard) destroys and remounts the parent Bard NodeView. The nested Replicator re-initializes from meta.collapsed, which still lists every set as collapsed from page load, so an expanded set snaps shut.
This makes nested page-builder blocks (Accordion / FAQ style sets with Grid + Bard inside) very hard to edit: open the set, click a field inside, the whole set collapses.
How to reproduce
Bard field with a set that contains a Replicator (collapse: true).
That Replicator set contains a Grid (stacked) and/or nested Bard fields.
Edit an entry, expand one Replicator set.
Click into a nested field (heading input, ProseMirror, field header, etc.).
Observe: the Bard NodeView / Replicator DOM is remounted (data-replicator-set node replaced), and the set is collapsed again.
Evidence from debugging
After expand: data-collapsed="false".
After clicking nested UI: previous set node is gone (document.contains(oldNode) === false), new node mounts with data-collapsed="true" when collapse: true.
The Replicator set header toggle button does not receive the click; collapse comes from remount + collapsed: clone(this.meta.collapsed) re-init.
Workaround: collapse: false on the nested Replicator — remount still happens, but sets stay open.
Expected behaviour
Expanding a nested Replicator set should survive interaction with its own fields. Collapsed state (and preferably the set DOM) should not reset when nested values cause the parent Bard set NodeView to sync/remount.
Environment
Statamic 6.36.0
Reproduced in Chromium (Cursor browser) against a Prime site page-builder Bard → set → Replicator → Grid/Bard nest
Related
Possibly related to Bard NodeView attr sync / remount behaviour when nested publish values change (watcher updating node.attrs.values).
Activity