Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions packages/payload/src/fields/config/sanitize.ts
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,10 @@ export const sanitizeFields = async ({
field.admin = {}
}

if (fieldIsVirtual(field) && typeof field.admin.readOnly === 'undefined') {
field.admin.readOnly = true
}

// Make sure that the richText field has an editor
if (field.type === 'richText') {
const sanitizeRichText = async (_config: SanitizedConfig) => {
Expand Down
Loading