From 8cb9870cf77edb4ee1c2fdbaa190a94e488d76f8 Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Fri, 20 Aug 2021 15:16:20 +0100 Subject: [PATCH] Prevent adding form steps inside other form steps and fix illegalChildren usage --- .../design/AppPreview/ComponentSelectionList.svelte | 3 ++- packages/standard-components/manifest.json | 6 +++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/packages/builder/src/components/design/AppPreview/ComponentSelectionList.svelte b/packages/builder/src/components/design/AppPreview/ComponentSelectionList.svelte index d8881a8d96..9893b07404 100644 --- a/packages/builder/src/components/design/AppPreview/ComponentSelectionList.svelte +++ b/packages/builder/src/components/design/AppPreview/ComponentSelectionList.svelte @@ -46,7 +46,7 @@ onItemChosen(item)} + disabled={isChildAllowed(item, $selectedComponent)} > {item.name} diff --git a/packages/standard-components/manifest.json b/packages/standard-components/manifest.json index b54812e8b3..04519f4f0f 100644 --- a/packages/standard-components/manifest.json +++ b/packages/standard-components/manifest.json @@ -1702,7 +1702,7 @@ "name": "Form", "icon": "Form", "hasChildren": true, - "illegalChildren": ["section"], + "illegalChildren": ["section", "form"], "actions": [ "ValidateForm", "ClearForm", @@ -1764,9 +1764,9 @@ }, "formstep": { "name": "Form Step", - "icon": "Form", + "icon": "AssetsAdded", "hasChildren": true, - "illegalChildren": ["section"], + "illegalChildren": ["section", "form", "form step"], "styles": ["size"], "settings": [ {