1
0
Fork 0
mirror of synced 2024-10-04 03:54:37 +13:00

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

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