diff --git a/doc/qweb.md b/doc/qweb.md
index e20bdf18..3d5a626b 100644
--- a/doc/qweb.md
+++ b/doc/qweb.md
@@ -294,14 +294,14 @@ There is another way to format a string attribute: the `t-attf-` directive. With
it, you get string interpolation:
```xml
-
+
```
For historical reason, there is an alternate form of string interpolation:
```xml
-
+
```
@@ -480,6 +480,24 @@ some method on a sub widget.
Note: if used on a component, the reference will be set in the `refs`
variable between `willPatch` and `patched`.
+The `t-ref` directive also accepts dynamic values with string interpolation
+(like the `t-attf-` directive). For example, if we have `id` set to 44 in the
+rendering context,
+
+```xml
+
+```
+
+```js
+this.refs.widget_44;
+```
+
+Similarly to `t-attf-`, there is an alternate form of string interpolation:
+
+```xml
+
+```
+
### `t-key` directive
Even though Owl tries to be as declarative as possible, some DOM state is still
diff --git a/extras/playground/samples.js b/extras/playground/samples.js
index f710e290..3351b395 100644
--- a/extras/playground/samples.js
+++ b/extras/playground/samples.js
@@ -551,7 +551,7 @@ const TODO_APP_STORE_XML = `
-
+
`;
diff --git a/extras/playground/templates.xml b/extras/playground/templates.xml
index 40e73716..5b384e6b 100644
--- a/extras/playground/templates.xml
+++ b/extras/playground/templates.xml
@@ -2,12 +2,12 @@
`
);
@@ -2277,7 +2277,7 @@ describe("t-mounted directive", () => {
test("combined with a t-ref", async () => {
env.qweb.addTemplate(
"TestWidget",
- ``
+ ``
);
class TestWidget extends Widget {
f() {}
diff --git a/tests/qweb.test.ts b/tests/qweb.test.ts
index 4ba216ea..8ea2217c 100644
--- a/tests/qweb.test.ts
+++ b/tests/qweb.test.ts
@@ -1,10 +1,5 @@
import { QWeb } from "../src/qweb_core";
-import {
- normalize,
- renderToDOM,
- renderToString,
- trim
-} from "./helpers";
+import { normalize, renderToDOM, renderToString, trim } from "./helpers";
//------------------------------------------------------------------------------
// Setup and helpers
@@ -1056,16 +1051,16 @@ describe("t-on", () => {
describe("t-ref", () => {
test("can get a ref on a node", () => {
- qweb.addTemplate("test", `
`);
+ qweb.addTemplate("test", `
`);
let refs: any = {};
renderToDOM(qweb, "test", { refs });
expect(refs.myspan.tagName).toBe("SPAN");
});
test("can get a dynamic ref on a node", () => {
- qweb.addTemplate("test", `