mirror of
https://github.com/odoo/owl.git
synced 2025-10-06 19:59:41 +07:00
[FIX] portal: allow use of expression to describe portal target
Before this commit, the value of the `t-portal` directive was inserted in the compiled template without being processed.
This commit is contained in:
committed by
Sam Degueldre
parent
0cd66c8518
commit
7137130c38
@@ -1268,7 +1268,8 @@ export class CodeGenerator {
|
||||
this.helpers.add("capture");
|
||||
this.define(ctxStr, `capture(ctx);`);
|
||||
}
|
||||
const blockString = `component(Portal, {target: ${ast.target},slots: {'default': {__render: ${name}, __ctx: ${ctxStr}}}}, key + \`${key}\`, node, ctx)`;
|
||||
const target = compileExpr(ast.target);
|
||||
const blockString = `component(Portal, {target: ${target},slots: {'default': {__render: ${name}, __ctx: ${ctxStr}}}}, key + \`${key}\`, node, ctx)`;
|
||||
if (block) {
|
||||
this.insertAnchor(block);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user