2
0
mirror of https://github.com/esiur/iui.git synced 2026-04-04 15:08:21 +00:00
This commit is contained in:
2024-07-16 08:57:35 +03:00
parent 4b2a3f3834
commit 1552eaac30
4 changed files with 100 additions and 28 deletions

View File

@@ -143,14 +143,12 @@ export default IUI.module(class Repeat extends IUIElement
value = [];
//debugger;
await super.setData(value, radix);
for (let i = 0; i < value.length; i++) {
let el = this._repeatNode.cloneNode(true);
el.setAttribute(":data", `d[${i}]`);
this.list.push(el);
try {
@@ -171,6 +169,7 @@ export default IUI.module(class Repeat extends IUIElement
await IUI.created(el, true);
/*
if (el instanceof IUIElement){
// @TODO should check if the element depends on parent or not
if (el.dataMap != null) {
@@ -194,9 +193,11 @@ export default IUI.module(class Repeat extends IUIElement
// data is now the radix
await IUI.render(el, el.data, false, value[i]);
}
*/
}
await super.setData(value, radix);
// @TODO: check if this works for event names starting with ":"