From 216d9b40a9ebfcc4ca208a5d0ba326cd73c755d5 Mon Sep 17 00:00:00 2001 From: Danielo Rodriguez Date: Thu, 14 Sep 2023 11:33:28 +0200 Subject: [PATCH] feat: keep the form header always visible fixes #11 --- src/views/EditFormView.ts | 2 +- src/views/FormBuilder.svelte | 33 ++++++++++++++++++++++++--------- src/views/ManageFormsView.ts | 1 - styles.css | 3 +++ 4 files changed, 28 insertions(+), 11 deletions(-) diff --git a/src/views/EditFormView.ts b/src/views/EditFormView.ts index f03971ab..fdd40fc1 100644 --- a/src/views/EditFormView.ts +++ b/src/views/EditFormView.ts @@ -41,7 +41,7 @@ export class EditFormView extends ItemView { async onOpen() { this.formEditor = new FormEditor({ - target: this.contentEl, + target: this.containerEl, props: { definition: this.formState, app: this.app, diff --git a/src/views/FormBuilder.svelte b/src/views/FormBuilder.svelte index 93d56486..b64ba2fb 100644 --- a/src/views/FormBuilder.svelte +++ b/src/views/FormBuilder.svelte @@ -85,9 +85,9 @@ }; -
+ -

Fields

- {#if definition.fields.length > 0} -
+
+

Fields

+ {#if definition.fields.length > 0} {#each definition.fields as field, index} {@const desc_id = `desc_${index}`} {@const delete_id = `delete_${index}`} @@ -346,14 +346,29 @@

{/each} - - {:else} - No fields yet - {/if} + {:else} + No fields yet + {/if} +