From 9a068f3a7b2721387f096e0af4312d268e8673c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rge=20N=C3=A6ss?= Date: Tue, 6 Mar 2018 20:15:46 +0100 Subject: [PATCH] [schema] Set default preview for slugs (#648) --- packages/@sanity/schema/src/legacy/types/slug.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/@sanity/schema/src/legacy/types/slug.js b/packages/@sanity/schema/src/legacy/types/slug.js index 58d1c3efdbb..f49d4275c6c 100644 --- a/packages/@sanity/schema/src/legacy/types/slug.js +++ b/packages/@sanity/schema/src/legacy/types/slug.js @@ -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)