From c63b623aa5bc27eb9000d1f9db2d8c7c0afa6c24 Mon Sep 17 00:00:00 2001 From: James Chu Date: Thu, 17 Oct 2024 15:11:32 +0800 Subject: [PATCH] refix for B96_ZK_5038Test (refine ZK-5107, ZK-5038) --- zul/src/main/resources/web/js/zul/sel/ItemWidget.ts | 6 +++--- zul/src/main/resources/web/js/zul/sel/Listcell.ts | 3 --- zul/src/main/resources/web/js/zul/sel/Treerow.ts | 6 +++--- 3 files changed, 6 insertions(+), 9 deletions(-) diff --git a/zul/src/main/resources/web/js/zul/sel/ItemWidget.ts b/zul/src/main/resources/web/js/zul/sel/ItemWidget.ts index 698a3444b8..b94d3fed3d 100644 --- a/zul/src/main/resources/web/js/zul/sel/ItemWidget.ts +++ b/zul/src/main/resources/web/js/zul/sel/ItemWidget.ts @@ -430,12 +430,12 @@ export class ItemWidget extends zul.Widget implements zul.m /** @internal */ override bind_(desktop?: zk.Desktop, skipper?: zk.Skipper, after?: CallableFunction[]): void { super.bind_(desktop, skipper, after); - zWatch.listen({ onResponse: this }); + zWatch.listen({ onSize: this }); } /** @internal */ override unbind_(skipper?: zk.Skipper, after?: CallableFunction[], keepRod?: boolean): void { - zWatch.unlisten({ onResponse: this }); + zWatch.unlisten({ onSize: this }); super.unbind_(skipper, after, keepRod); } @@ -453,7 +453,7 @@ export class ItemWidget extends zul.Widget implements zul.m this._shallCheckClearCache = true; } - onResponse(): void { + override onSize(): void { if (this._shallCheckClearCache) { this._shallCheckClearCache = false; if (this.getMeshWidget()?.isCheckmark()) { diff --git a/zul/src/main/resources/web/js/zul/sel/Listcell.ts b/zul/src/main/resources/web/js/zul/sel/Listcell.ts index 27ab254efd..a5883c2cb4 100644 --- a/zul/src/main/resources/web/js/zul/sel/Listcell.ts +++ b/zul/src/main/resources/web/js/zul/sel/Listcell.ts @@ -182,9 +182,6 @@ export class Listcell extends zul.LabelImageWidget { // ZK-5035: Remove the old checkmark to prevent duplicate checkmarks if (this.parent?.$n('cm')) this.nextSibling?.rerender(); - else { - this.parent?.clearCache(); - } var chkable = p.isSelectable(), multi = box.isMultiple(); diff --git a/zul/src/main/resources/web/js/zul/sel/Treerow.ts b/zul/src/main/resources/web/js/zul/sel/Treerow.ts index d23fc701c5..3059765aa0 100644 --- a/zul/src/main/resources/web/js/zul/sel/Treerow.ts +++ b/zul/src/main/resources/web/js/zul/sel/Treerow.ts @@ -116,12 +116,12 @@ export class Treerow extends zul.Widget { /** @internal */ override bind_(desktop?: zk.Desktop, skipper?: zk.Skipper, after?: CallableFunction[]): void { super.bind_(desktop, skipper, after); - zWatch.listen({onResponse: this}); + zWatch.listen({ onSize: this }); } /** @internal */ override unbind_(skipper?: zk.Skipper, after?: CallableFunction[], keepRod?: boolean): void { - zWatch.unlisten({onResponse: this}); + zWatch.unlisten({ onSize: this }); super.unbind_(skipper, after, keepRod); } @@ -139,7 +139,7 @@ export class Treerow extends zul.Widget { this._shallCheckClearCache = true; } - onResponse(): void { + override onSize(): void { if (this._shallCheckClearCache) { this._shallCheckClearCache = false; if (this.getTree()?.isCheckmark()) {