Closed ainglese closed 7 years ago
Hi ainglese,
Yes you are right - that is a bug - thanks very much for calling it out.
I have a fix ready for the next update. You could test and let me know if works correctly for you.
Change this line: https://github.com/BorisMoore/jsviews/blob/master/jsviews.js#L1436 : to
|| new View(context, "array", view, data, tmpl, key, onRender, contentTmpl);
and this: https://github.com/BorisMoore/jsviews/blob/master/jsviews.js#L1451 to:
childView = new View(newCtx, "item", newView, data[i], tmpl, (key || 0) + i, onRender, newView.content);
Thanks, Boris
Resolved in commit 82
Hi boris, i don't know if this is by design (and if so why) but if you look at this template (for a custom tag):
when i add/remove an item to "list", using $.observable(list).insert(..), the new item is rendered, i can correctly see both "A" and "B", but the second include is not rendered on the newly added item. using the first include correctly works..
also note that items that are on the list when linking the template, correctly gets rendered (and updated) for both the include.
i've tried both {{include tmpl=#content /}} and {^{include tmpl=#content /}} but doesn't change