mirror of
https://github.com/odoo/owl.git
synced 2025-10-06 19:59:41 +07:00
make sure subwidgets have proper parents
This commit is contained in:
@@ -682,7 +682,7 @@ const widgetDirective: Directive = {
|
||||
let props = node.getAttribute("t-props");
|
||||
let widgetID = ctx.generateID();
|
||||
ctx.addLine(
|
||||
`let _${widgetID} = new context.widgets['${value}'](context, ${props})`
|
||||
`let _${widgetID} = new context.widgets['${value}'](owner, ${props})`
|
||||
);
|
||||
ctx.addLine(
|
||||
`let def${defID} = _${widgetID}._start().then(() => _${widgetID}._render()).then(vnode=>{Object.assign(_${dummyID}, vnode);_${dummyID}.key="${dummyID}";_${dummyID}.data.hook = {create(_,vn){_${widgetID}._mount(vn)}}})`
|
||||
|
||||
Reference in New Issue
Block a user