Make form block view readonly

This commit is contained in:
Mel O'Hagan 2023-11-01 16:40:23 +00:00
parent 33e37261b2
commit 5923ae2983
3 changed files with 4 additions and 8 deletions

View File

@ -56,7 +56,7 @@
easyMDEOptions={{ easyMDEOptions={{
initialValue: value, initialValue: value,
placeholder, placeholder,
toolbar: readonly ? false : undefined, toolbar: disabled || readonly ? false : undefined,
...easyMDEOptions, ...easyMDEOptions,
}} }}
/> />

View File

@ -5640,12 +5640,7 @@
"type": "boolean", "type": "boolean",
"label": "Disabled", "label": "Disabled",
"key": "disabled", "key": "disabled",
"defaultValue": false, "defaultValue": false
"dependsOn": {
"setting": "actionType",
"value": "View",
"invert": true
}
} }
] ]
}, },

View File

@ -136,7 +136,8 @@
actionType: actionType === "Create" ? "Create" : "Update", actionType: actionType === "Create" ? "Create" : "Update",
dataSource, dataSource,
size, size,
disabled: disabled || actionType === "View", disabled,
readonly: !disabled && actionType === "View",
}} }}
styles={{ styles={{
normal: { normal: {