[IMP] qweb: make t-key directive dynamic

instead of having t-key and t-att-key.

closes #36
This commit is contained in:
Géry Debongnie
2019-04-16 14:35:27 +02:00
parent 7092f5e142
commit 0ca4cc1596
5 changed files with 84 additions and 10 deletions
+2 -2
View File
@@ -832,7 +832,7 @@ describe("composition", () => {
"parent",
`<div>
<t t-foreach="state.numbers" t-as="number">
<t t-widget="ChildWidget" t-att-key="number"/>
<t t-widget="ChildWidget" t-key="number"/>
</t>
</div>`
);
@@ -1103,7 +1103,7 @@ describe("random stuff/miscellaneous", () => {
test("snapshotting compiled code", async () => {
env.qweb.addTemplate(
"parent",
`<div><t t-widget="child" t-key="somestring" t-props="{flag:state.flag}"/></div>`
`<div><t t-widget="child" t-key="'somestring'" t-props="{flag:state.flag}"/></div>`
);
class Parent extends Widget {
inlineTemplate = "parent";