Skip to content

Commit

Permalink
[schema] Set default preview for slugs (#648)
Browse files Browse the repository at this point in the history
  • Loading branch information
bjoerge committed Mar 6, 2018
1 parent 0b47ac2 commit 9a068f3
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/@sanity/schema/src/legacy/types/slug.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,10 @@ export const SlugType = {
},
extend(subTypeDef) {
const parsed = Object.assign(pick(SLUG_CORE, OVERRIDABLE_FIELDS), subTypeDef, {
type: SLUG_CORE
type: SLUG_CORE,
preview: {
select: {title: 'current'}
}
})
return subtype(parsed)

Expand Down

0 comments on commit 9a068f3

Please sign in to comment.