From b0fcb0f339f9ab198e63aa05e60a4fd90b6d6214 Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Tue, 14 Jun 2022 15:34:33 +0100 Subject: [PATCH] Prevent inline editing of components with missing required settings --- packages/client/src/components/Component.svelte | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/client/src/components/Component.svelte b/packages/client/src/components/Component.svelte index 582392babe..3fa408c295 100644 --- a/packages/client/src/components/Component.svelte +++ b/packages/client/src/components/Component.svelte @@ -101,10 +101,10 @@ // Derive definition properties which can all be optional, so need to be // coerced to booleans - $: editable = !!definition?.editable $: hasChildren = !!definition?.hasChildren $: showEmptyState = definition?.showEmptyState !== false $: hasMissingRequiredSettings = missingRequiredSettings?.length > 0 + $: editable = !!definition?.editable && !hasMissingRequiredSettings // Interactive components can be selected, dragged and highlighted inside // the builder preview