Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
.child(() =>
delay(
S.documentList({
id: 'title-list',
title: 'Titles!',
options: {
filter: 'defined(title)'
}
})
)
),
S.documentTypeList('book')
.title('Books by author')
.filter('_type == $type && author._ref == $authorId')
.params({type: 'book', authorId})
.initialValueTemplates([S.initialValueTemplateItem('book-by-author', {authorId})])
)
}),
S.divider(),
...S.documentTypeListItems(),
S.listItem()
.title('Custom books list')
.child(
S.documentList()
.title('Unspecified books list')
.menuItems(S.documentTypeList('book').getMenuItems())
.filter('_type == $type')
.params({type: 'book'})
),
S.documentTypeListItem('sanity.imageAsset')
.title('Images')
.icon(MdImage)
])