We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I'm not sure how to change the default "preview" I browsed the libraries types but can't see any reference to preview when defining a new document?
I suppose this is how it should be implemented?
import { defineDocument } from 'sanity-typed-queries'; const { document } = defineDocument('user', { name: { type: 'string', }, email: { type: 'string', validation: (Rule) => Rule.required(), }, handle: { type: 'slug', options: { source: 'name', maxLength: 96, }, }, avatar: { type: 'image', options: { hotspot: true, sources: [Default, Webcam], }, }, company: { type: 'string', }, }); export default { ...document, preview: { select: { title: 'name', media: 'image', }, }, };
The text was updated successfully, but these errors were encountered:
Yes, exactly. I'd welcome a PR to take a third argument of additional 'options' if you think that would improve DX.
Sorry, something went wrong.
danielroe
No branches or pull requests
I'm not sure how to change the default "preview" I browsed the libraries types but can't see any reference to preview when defining a new document?
I suppose this is how it should be implemented?
The text was updated successfully, but these errors were encountered: