[FIX] component: better templateId for multiple subcomponents

Of course, the templateId computation is kind of tricky.  Here, an issue
occurred because the templateId did not take the componentId into
account when we were in a loop, but with no keyed parent.

This meant that multiple sub components shared the same templateId,
confusing the vdom algorithm.
This commit is contained in:
Géry Debongnie
2019-09-03 16:38:24 +02:00
parent cfdce29ce7
commit 0c1a7aabae
3 changed files with 30 additions and 3 deletions
+1 -1
View File
@@ -245,7 +245,7 @@ QWeb.addDirective({
? `key${keyID}`
: ctx.inLoop
? ctx.currentKey
? `String(${ctx.currentKey} + '_k_' + i)`
? `String(${ctx.currentKey} + '_k_' + i + '_c_' + ${componentID} )`
: `String(-${componentID} - i)`
: String(componentID);
if (ctx.allowMultipleRoots) {