From e5737987c550851b3207716537e6baf11562534a Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Wed, 9 Jun 2021 12:55:17 +0100 Subject: [PATCH] Change form type setting to 'actionType' to avoid clashing with old settings --- packages/standard-components/manifest.json | 2 +- packages/standard-components/src/forms/Form.svelte | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/standard-components/manifest.json b/packages/standard-components/manifest.json index 998d053fe3..81aa63e1e3 100644 --- a/packages/standard-components/manifest.json +++ b/packages/standard-components/manifest.json @@ -1026,7 +1026,7 @@ { "type": "select", "label": "Type", - "key": "type", + "key": "actionType", "options": ["Create", "Update"], "defaultValue": "Create" }, diff --git a/packages/standard-components/src/forms/Form.svelte b/packages/standard-components/src/forms/Form.svelte index 438e93073e..327cc70572 100644 --- a/packages/standard-components/src/forms/Form.svelte +++ b/packages/standard-components/src/forms/Form.svelte @@ -8,7 +8,7 @@ export let theme export let size export let disabled = false - export let type = "Create" + export let actionType = "Create" const component = getContext("component") const context = getContext("context") @@ -42,7 +42,7 @@ } // Use the closest data context as the initial form values - const initialValues = getInitialValues(type, dataSource, $context) + const initialValues = getInitialValues(actionType, dataSource, $context) // Form state contains observable data about the form const formState = writable({ values: initialValues, errors: {}, valid: true })