always set readonly attr if a property can not be updated

This commit is contained in:
Mads Rasmussen
2022-07-07 10:22:15 +02:00
parent a63840a34e
commit 4a1bccc58c
3 changed files with 4 additions and 4 deletions

View File

@@ -19,7 +19,7 @@
preview="(propertyEditorDisabled(property) && allowUpdate) || (!allowUpdate && !property.supportsReadOnly)"
allow-unlock="allowUpdate && allowEditInvariantFromNonDefault"
on-unlock="unlockInvariantValue(property)"
ng-attr-readonly="{{(property.supportsReadOnly && !allowUpdate) || undefined}}">
ng-attr-readonly="{{ !allowUpdate) || undefined}}">
</umb-property-editor>
</umb-property>
@@ -51,7 +51,7 @@
preview="(propertyEditorDisabled(property) && allowUpdate) || (!allowUpdate && !property.supportsReadOnly)"
allow-unlock="allowUpdate && allowEditInvariantFromNonDefault"
on-unlock="unlockInvariantValue(property)"
ng-attr-readonly="{{(property.supportsReadOnly && !allowUpdate) || undefined}}">
ng-attr-readonly="{{!allowUpdate || undefined}}">
</umb-property-editor>
</umb-property>

View File

@@ -18,7 +18,7 @@
<umb-property-editor
model="property"
preview="(vm.model.variants.length > 1 && !activeVariant.language.isDefault && !property.culture && !property.unlockInvariantValue) || (!vm.allowUpdate && !property.supportsReadOnly)"
ng-attr-readonly="{{(!vm.allowUpdate && property.supportsReadOnly) || undefined}}">
ng-attr-readonly="{{!vm.allowUpdate || undefined}}">
</umb-property-editor>
</umb-property>

View File

@@ -11,7 +11,7 @@
<umb-property-editor
model="property"
preview="readonly && !property.supportsReadOnly"
ng-attr-readonly="{{(readonly && property.supportsReadOnly) || undefined }}">
ng-attr-readonly="{{readonly || undefined }}">
</umb-property-editor>
</umb-property>