chore: better organizes collection preview
This commit is contained in:
@@ -46,9 +46,9 @@ const DefaultEditView: React.FC<Props> = (props) => {
|
||||
admin: {
|
||||
useAsTitle,
|
||||
disableDuplicate,
|
||||
preview,
|
||||
},
|
||||
timestamps,
|
||||
preview,
|
||||
auth,
|
||||
upload,
|
||||
} = collection;
|
||||
|
||||
@@ -12,7 +12,6 @@ const collectionSchema = joi.object().keys({
|
||||
singular: joi.string(),
|
||||
plural: joi.string(),
|
||||
}),
|
||||
preview: joi.func(),
|
||||
access: joi.object({
|
||||
create: joi.func(),
|
||||
read: joi.func(),
|
||||
@@ -32,6 +31,7 @@ const collectionSchema = joi.object().keys({
|
||||
Edit: component,
|
||||
}),
|
||||
}),
|
||||
preview: joi.func(),
|
||||
}),
|
||||
fields: joi.array()
|
||||
.items(fieldSchema),
|
||||
|
||||
@@ -108,8 +108,8 @@ export type PayloadCollectionConfig = {
|
||||
}
|
||||
};
|
||||
enableRichTextRelationship?: boolean
|
||||
preview?: (doc: Document, token: string) => string
|
||||
};
|
||||
preview?: (doc: Document, token: string) => string
|
||||
hooks?: {
|
||||
beforeOperation?: BeforeOperationHook[];
|
||||
beforeValidate?: BeforeValidateHook[];
|
||||
|
||||
Reference in New Issue
Block a user