How to use the @sanity/desk-tool/structure-builder.initialValueTemplateItem function in @sanity/desk-tool

To help you get started, we’ve selected a few @sanity/desk-tool examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github sanity-io / sanity / packages / test-studio / src / deskStructure.js View on Github external
child: () =>
          S.documentTypeList('author')
            .title('Developers')
            .filter('_type == $type && role == $role')
            .params({type: 'author', role: 'developer'})
            .initialValueTemplates(S.initialValueTemplateItem('author-developer'))
      }),
github sanity-io / sanity / packages / test-studio / src / deskStructure.js View on Github external
S.documentTypeList('author').child(authorId =>
            S.documentTypeList('book')
              .title('Books by author')
              .filter('_type == $type && author._ref == $authorId')
              .params({type: 'book', authorId})
              .initialValueTemplates([S.initialValueTemplateItem('book-by-author', {authorId})])
          )