Prevent inline editing of components with missing required settings

This commit is contained in:
Andrew Kingston 2022-06-14 15:34:33 +01:00
parent f1ce3de3d6
commit b0fcb0f339
1 changed files with 1 additions and 1 deletions

View File

@ -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