Racheal Pennell
Community Engineer at Sanity.io
Prefer to have no image next to your array items? This can help!
// import React at the top of the document
preview: {
select: {
title: // your title field,
subtitle: // your subtitle field
},
prepare({ title, subtitle }) {
return {
title: title,
subtitle: subtitle,
media: <span />
}
}
}
The icon for an item in an array is based off of the preview in that item’s schema and can be customized using Previews/List Views.
Completely removing the icon isn't as straightforward, though (since setting media
to null or an empty string defaults back to the original icon). If you're set on having no icon at all rendering an empty span or div can get you there.
Community Engineer at Sanity.io
Add a count of documents to your Structure Builder panes
Go to Display a document count in the title of a pane in Structure BuilderSanity preview component cannot access the parent/document if its inside an array or object. Using Custom Preview component, we can solve the issue.
Go to Sanity Custom Preview Component to get Parent DocumentIf you'd like to be able to reference your project users within your content, you'll need to create a document for them.
Go to Create A Document for All Current Project Users