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