Sanity Studio v5.11.0: Conditional multi-schema references and bug fixes
This release improves reference field creation filtering with dynamic options, fixes document publishing issues, and enhances the display of nested content and release titles.
It is now possible to apply dynamic document based filtering to the acceptable schema types from which to create a new reference field. When a document contains a reference field with a to that includes multiple schema types, by defining an options.creationTypeFilter callback, the available schemas when selecting Create can be restricted.
If creationTypeFilter returns [] then the create button will be hidden from the reference field. This is identical behavior to using options.disableNew: true
defineField({
name: 'participant',
title: 'Individual or team participant,
type: 'reference',
to: [{type: 'individual'}, {type: 'team'}],
options: {
creationTypeFilter: ({document}, toTypes) => {
if (document.participantType === 'individual') {
return toTypes.filter((t) => t.type === 'individual')
}
if (document.participantType === 'team') {
return toTypes.filter((t) => t.type === 'team')
}
return toTypes
},
},
})
markDefs) on some PTE nested objects, instead shows the content in the PTE’s previewFetched April 11, 2026