diff --git a/examples/web/static/src/xml/templates.xml b/examples/web/static/src/xml/templates.xml
index b3f99c9d..4793603d 100644
--- a/examples/web/static/src/xml/templates.xml
+++ b/examples/web/static/src/xml/templates.xml
@@ -3,7 +3,7 @@
-
+
diff --git a/src/qweb.ts b/src/qweb.ts
index a588e8a7..7d6632bf 100644
--- a/src/qweb.ts
+++ b/src/qweb.ts
@@ -195,7 +195,7 @@ export class QWeb {
attf: 1,
props: 1,
key: 1,
- keep: 1 // todo: rename keep-alive to keepalive
+ keepalive: 1
};
[
forEachDirective,
@@ -940,7 +940,7 @@ const widgetDirective: Directive = {
ctx.addLine("//WIDGET");
ctx.rootContext.shouldDefineOwner = true;
let props = node.getAttribute("t-props");
- let keepAlive = node.getAttribute("t-keep-alive") ? true : false;
+ let keepAlive = node.getAttribute("t-keepalive") ? true : false;
// t-on- events...
const events: [string, string][] = [];
diff --git a/tests/component.test.ts b/tests/component.test.ts
index cf8ff05e..bea82b43 100644
--- a/tests/component.test.ts
+++ b/tests/component.test.ts
@@ -739,10 +739,10 @@ describe("composition", () => {
);
});
- test("sub widgets with t-keep-alive are not destroyed if no longer in dom", async () => {
+ test("sub widgets with t-keepalive are not destroyed if no longer in dom", async () => {
class ParentWidget extends Widget {
state = { ok: true };
- inlineTemplate = `
`;
+ inlineTemplate = `
`;
widgets = { counter: Counter };
}
const widget = new ParentWidget(env);
@@ -765,10 +765,10 @@ describe("composition", () => {
);
});
- test("sub widgets dom state with t-keep-alive is preserved", async () => {
+ test("sub widgets dom state with t-keepalive is preserved", async () => {
class ParentWidget extends Widget {
state = { ok: true };
- inlineTemplate = `
`;
+ inlineTemplate = `
`;
widgets = { InputWidget };
}
class InputWidget extends Widget {