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
Repeater items aren't stored with an identifier. While a repeater is open, the admin editor gives each item a temporary _key, then removes all of them before it saves. Items written through the REST API, MCP, or seed files never get a key either. The server keeps a _key if a client sends one but never creates one, so the next save from the admin removes it again.
Without a stored key, the only thing that identifies an item is its position in the array. This causes problems in two places:
The admin editor. When a repeater's value changes from outside the field (a restored revision, a save response, a plugin or AI edit), the editor reuses temporary keys by position. Collapsed or expanded state and mounted inputs then stay with the position, not the item.
Comparing versions. Revision history currently shows a changed repeater only as "N items". Showing which item was added, removed, moved, or edited means pairing items between two versions. Without keys that pairing has to be guessed from content and position, and it guesses wrong when items are reordered and edited in the same save. Portable Text tables and galleries already use _key for this.
I've started an RFC draft with AI assistance. It still needs cleanup: #4272
Use case
A site syncs repeater content to an external system (translation service) and needs to know which item changed rather than re-sending the whole array.
An editor reorders a pricing tier list and changes one price in the same save. Revision history should show one move and one edit, not three changed items.
A plugin or script updates one item through the API and needs a way to address it that survives reordering.
Editor notes (possible future feature). EmDash might later let editors leave notes on specific fields, for example a note on one repeater item saying "check this price with sales". A note tied to a position would end up on a different item once items are reordered or deleted. With a stable key, the note stays on the right item.
Real-time co-editing (possible future feature). If EmDash adds real-time co-editing, it will need to merge changes from two editors working on the same repeater. When one editor moves an item while the other edits it, the edit has to land on the moved item, not on whatever item now sits at the old position. That only works if each item has an identifier both editors share.
Current workarounds
Use the array index as the render key, and accept wrong state after reorders and deletions.
Your involvement
I am requesting this capability.
I am offering to champion the design in a feature plan or RFC.
I am offering to implement it after the design is accepted.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Problem
Repeater items aren't stored with an identifier. While a repeater is open, the admin editor gives each item a temporary
_key, then removes all of them before it saves. Items written through the REST API, MCP, or seed files never get a key either. The server keeps a_keyif a client sends one but never creates one, so the next save from the admin removes it again.Without a stored key, the only thing that identifies an item is its position in the array. This causes problems in two places:
_keyfor this.I've started an RFC draft with AI assistance. It still needs cleanup: #4272
Use case
Current workarounds
Use the array index as the render key, and accept wrong state after reorders and deletions.
Your involvement
All reactions