From 6293dade57e451bc68162d5a07db2664fecbfd1f Mon Sep 17 00:00:00 2001 From: Danielo Rodriguez Date: Sun, 22 Oct 2023 13:51:23 +0200 Subject: [PATCH] fix: accept empty option values for now --- src/core/formDefinition.ts | 2 +- src/views/EditFormView.ts | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/core/formDefinition.ts b/src/core/formDefinition.ts index 3aa733b9..b02d8147 100644 --- a/src/core/formDefinition.ts +++ b/src/core/formDefinition.ts @@ -32,7 +32,7 @@ const InputSelectFixedSchema = object({ type: literal("select"), source: literal("fixed"), options: array(object({ - value: nonEmptyString('Value of a select option'), label: string() + value: string([toTrimmed()]), label: string() })) }); diff --git a/src/views/EditFormView.ts b/src/views/EditFormView.ts index 2b179559..7fecc2b2 100644 --- a/src/views/EditFormView.ts +++ b/src/views/EditFormView.ts @@ -46,7 +46,6 @@ export class EditFormView extends ItemView { target: this.containerEl, props: { definition: this.formState, - app: this.app, onChange: () => { console.log(this.formState) this.app.workspace.requestSaveLayout()