1
0
Fork 0
mirror of synced 2024-06-30 12:00:31 +12: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 599d9eb406
commit 8fbcf86d40

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