mirror of
https://github.com/strapi/strapi.git
synced 2025-09-26 17:00:55 +00:00
Init nested edits
This commit is contained in:
parent
6e8b0d17d3
commit
e8eb6684f3
@ -73,13 +73,13 @@ module.exports = {
|
|||||||
ctx.createComponent(compoToCreate);
|
ctx.createComponent(compoToCreate);
|
||||||
}
|
}
|
||||||
|
|
||||||
// const nestedComponentsToEdit = body.components.filter(
|
const nestedComponentsToEdit = body.components.filter(
|
||||||
// compo => !_.has(compo, 'uid')
|
compo => !_.has(compo, 'uid')
|
||||||
// );
|
);
|
||||||
|
|
||||||
// nestedComponentsToEdit.forEach(compo => {
|
for (let compoToEdit of nestedComponentsToEdit) {
|
||||||
// ctx.editComponent(compo.uid, compo);
|
ctx.editComponent(compoToEdit);
|
||||||
// });
|
}
|
||||||
|
|
||||||
return component;
|
return component;
|
||||||
})
|
})
|
||||||
|
@ -165,6 +165,15 @@ const createTransaction = ({ components, contentTypes }) => {
|
|||||||
return handler;
|
return handler;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* create a component in the tmpComponent map
|
||||||
|
*/
|
||||||
|
editComponent(infos) {
|
||||||
|
const { uid } = infos;
|
||||||
|
|
||||||
|
return tmpComponents.get(uid);
|
||||||
|
},
|
||||||
|
|
||||||
flush() {
|
flush() {
|
||||||
return Promise.all(
|
return Promise.all(
|
||||||
[
|
[
|
||||||
|
Loading…
x
Reference in New Issue
Block a user