diff --git a/doric-web/src/shader/DoricListNode.ts b/doric-web/src/shader/DoricListNode.ts index e2a4d78d..43f7075a 100644 --- a/doric-web/src/shader/DoricListNode.ts +++ b/doric-web/src/shader/DoricListNode.ts @@ -40,10 +40,24 @@ export class DoricListNode extends DoricSuperNode { } } + reload() { + this.reset() + const ret = this.pureCallJSResponse("renderBunchedItems", 0, this.itemCount) as DVModel[] + ret.forEach(e => { + const viewNode = DoricViewNode.create(this.context, e.type) as DoricListItemNode + viewNode.viewId = e.id + viewNode.init(this) + viewNode.blend(e.props) + this.view.appendChild(viewNode.view) + return viewNode + }) + } + reset() { while (this.view.lastElementChild) { this.view.removeChild(this.view.lastElementChild) } + this.childNodes = [] } onBlending() {