mirror of
https://github.com/zhigang1992/firecms.git
synced 2026-06-17 02:51:51 +08:00
Moved delete hook to entity schema level
This commit is contained in:
@@ -489,8 +489,12 @@ productSchema.onPreSave = ({
|
||||
return values;
|
||||
};
|
||||
|
||||
productSchema.onSaveSuccess = () => {
|
||||
console.log("onSaveSuccess");
|
||||
productSchema.onSaveSuccess = (props) => {
|
||||
console.log("onSaveSuccess", props);
|
||||
};
|
||||
|
||||
productSchema.onDelete = (props) => {
|
||||
console.log("onDelete", props);
|
||||
};
|
||||
|
||||
const formQuestions: string[] = ["birth_year",
|
||||
@@ -682,9 +686,6 @@ const blogCollection = buildCollection({
|
||||
filterableProperties: ["name", "status"],
|
||||
initialFilter: {
|
||||
"status": ["==", "published"]
|
||||
},
|
||||
onEntityDelete: (path, entity) => {
|
||||
console.log("Log from onEntityDelete hook", entity);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user