From d5fb7e50c8742cc99b447943091ad53040544b94 Mon Sep 17 00:00:00 2001 From: Michael Shanks Date: Thu, 31 Oct 2019 09:25:26 +0000 Subject: [PATCH] builder: create record: set collection name automatically --- packages/builder/src/database/RecordView.svelte | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/packages/builder/src/database/RecordView.svelte b/packages/builder/src/database/RecordView.svelte index 1b6032f228..d0a8f7acdb 100644 --- a/packages/builder/src/database/RecordView.svelte +++ b/packages/builder/src/database/RecordView.svelte @@ -79,6 +79,12 @@ let getTypeOptions = typeOptions => join("
") ]); +const nameChanged = ev => { + const pluralName = n => `${n}s`; + if(record.collectionName === "") { + record.collectionName = pluralName(ev.target.value); + } +} @@ -87,9 +93,9 @@ let getTypeOptions = typeOptions =>

Settings -

+ - + {#if !record.isSingle}