Skip to main content
Editing the items of a list needs only anchors. Growing the list needs the schema to know what a new item looks like, so the Add form can ask for it. Two steps.

1. Anchor the list

stageArray on the element that holds the items, with the label the tab shows. Each item is a direct child of that element. Fields inside an item use their indexed path, props.items.2.title, so the editor can address one item.
Items get their own generated ids when they are added, so reordering and removing address the item, not its position.

2. Describe the item

In lib/admin-schema.ts, under components, keyed by the component type and the list’s dotted path:
form is only for adding. Once an item exists, its anchored fields are edited in place. A field with no anchor, such as a link target, stays in the form and is edited from the item’s cog.

What editors get

In Edit mode the section’s tab gains a +. Adding opens the form, then the item appears in place with no reload. Hover an item for its drag handle and its ×.

Variations

Next steps

Page schemas

Every key an array entry accepts.

The edit notch

Where the add and settings affordances live.