
Grab your gear: The official Sanity swag store
Read Grab your gear: The official Sanity swag storeYou're looking for preview configuration in Sanity! This controls how documents and objects appear in lists throughout the Studio.
By default, Sanity tries to automatically generate preview titles from your document fields, which can result in those strange names you're seeing. You can take full control using the preview property in your schema.
Here's how to set up basic preview configuration:
{
name: 'row',
type: 'object',
preview: {
select: {
title: 'name', // Use the 'name' field as the title
subtitle: 'description'
}
}
}If you need custom logic (like combining multiple fields or formatting), use the prepare function:
preview: {
select: {
firstName: 'firstName',
lastName: 'lastName'
},
prepare({firstName, lastName}) {
return {
title: `${firstName} ${lastName}`,
subtitle: 'Customer'
}
}
}For your specific case of wanting "Row 1", "Row 2" numbering, this is trickier since the standard preview configuration doesn't have built-in access to the array index. You have a few options:
The simplest approach is option 1 - add a field to store the row number:
{
name: 'row',
type: 'object',
fields: [
{
name: 'rowNumber',
type: 'number',
hidden: true,
readOnly: true
},
// your other fields
],
preview: {
select: {
rowNumber: 'rowNumber'
},
prepare({rowNumber}) {
return {
title: `Row ${rowNumber || '?'}`
}
}
}
}You can read more about this in the official preview configuration documentation and check out this guide on creating richer array item previews for more advanced examples.
Sanity is the developer-first content operating system that gives you complete control. Schema-as-code, GROQ queries, and real-time APIs mean no more workarounds or waiting for deployments. Free to start, scale as you grow.
Content operations
Content backend


The only platform powering content operations
By Industry


Tecovas strengthens their customer connections
Build and Share

Grab your gear: The official Sanity swag store
Read Grab your gear: The official Sanity swag store