mirror of
https://github.com/odoo/owl.git
synced 2025-10-06 19:59:41 +07:00
[IMP] directive: make props override t-props
Before this commit, props and t-props were computed like `Object.assign(props, t_props)`. Now, it computes like `Object.assign(t_props, props)` so props will override t-props. closes https://github.com/odoo/owl/issues/886
This commit is contained in:
committed by
Géry Debongnie
parent
7ebe0da962
commit
d08ea63565
@@ -336,7 +336,7 @@ QWeb.addDirective({
|
||||
}
|
||||
if (hasDynamicProps) {
|
||||
const dynamicProp = ctx.formatExpression(node.getAttribute("t-props")!);
|
||||
ctx.addLine(`let props${componentID} = Object.assign({${propStr}}, ${dynamicProp});`);
|
||||
ctx.addLine(`let props${componentID} = Object.assign({}, ${dynamicProp}, {${propStr}});`);
|
||||
} else {
|
||||
ctx.addLine(`let props${componentID} = {${propStr}};`);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user