From be37720dc55edb98b9d050bc85463f6a1b2e1b7a Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Mon, 28 Jun 2021 10:09:31 +0100 Subject: [PATCH] Fix placement of 'reset fields' button for field groups --- .../design/PropertiesPanel/ComponentSettingsSection.svelte | 4 ++++ .../components/design/PropertiesPanel/PropertiesPanel.svelte | 2 -- .../ResetFieldsButton.svelte} | 5 ++--- 3 files changed, 6 insertions(+), 5 deletions(-) rename packages/builder/src/components/design/PropertiesPanel/{ActionsSection.svelte => PropertyControls/ResetFieldsButton.svelte} (92%) diff --git a/packages/builder/src/components/design/PropertiesPanel/ComponentSettingsSection.svelte b/packages/builder/src/components/design/PropertiesPanel/ComponentSettingsSection.svelte index 6977516baa..637ce22233 100644 --- a/packages/builder/src/components/design/PropertiesPanel/ComponentSettingsSection.svelte +++ b/packages/builder/src/components/design/PropertiesPanel/ComponentSettingsSection.svelte @@ -30,6 +30,7 @@ import DateTimeFieldSelect from "./PropertyControls/DateTimeFieldSelect.svelte" import AttachmentFieldSelect from "./PropertyControls/AttachmentFieldSelect.svelte" import RelationshipFieldSelect from "./PropertyControls/RelationshipFieldSelect.svelte" + import ResetFieldsButton from "./PropertyControls/ResetFieldsButton.svelte" export let componentDefinition export let componentInstance @@ -122,6 +123,9 @@ {/if} {/each} {/if} + {#if componentDefinition?.component?.endsWith("/fieldgroup")} + + {/if} {#if componentDefinition?.info}
{@html componentDefinition?.info} diff --git a/packages/builder/src/components/design/PropertiesPanel/PropertiesPanel.svelte b/packages/builder/src/components/design/PropertiesPanel/PropertiesPanel.svelte index 003b9d448c..c1e26e68cd 100644 --- a/packages/builder/src/components/design/PropertiesPanel/PropertiesPanel.svelte +++ b/packages/builder/src/components/design/PropertiesPanel/PropertiesPanel.svelte @@ -5,7 +5,6 @@ import ComponentSettingsSection from "./ComponentSettingsSection.svelte" import DesignSection from "./DesignSection.svelte" import CustomStylesSection from "./CustomStylesSection.svelte" - import ActionsSection from "./ActionsSection.svelte" $: componentInstance = $selectedComponent $: componentDefinition = store.actions.components.getDefinition( @@ -20,7 +19,6 @@ -
diff --git a/packages/builder/src/components/design/PropertiesPanel/ActionsSection.svelte b/packages/builder/src/components/design/PropertiesPanel/PropertyControls/ResetFieldsButton.svelte similarity index 92% rename from packages/builder/src/components/design/PropertiesPanel/ActionsSection.svelte rename to packages/builder/src/components/design/PropertiesPanel/PropertyControls/ResetFieldsButton.svelte index 9d6297913e..d5b82176ce 100644 --- a/packages/builder/src/components/design/PropertiesPanel/ActionsSection.svelte +++ b/packages/builder/src/components/design/PropertiesPanel/PropertyControls/ResetFieldsButton.svelte @@ -5,7 +5,6 @@ import { makeDatasourceFormComponents } from "builderStore/store/screenTemplates/utils/commonComponents" import ConfirmDialog from "components/common/ConfirmDialog.svelte" - export let componentDefinition export let componentInstance let confirmResetFieldsDialog @@ -25,7 +24,7 @@ } -{#if componentDefinition?.component?.endsWith("/fieldgroup")} +
Update form fields -{/if} +