From 83851ed1735c6a255476e6009be30ba8c1273a78 Mon Sep 17 00:00:00 2001 From: samhere06 <118881732+samhere06@users.noreply.github.com> Date: Fri, 22 May 2026 16:38:16 +0530 Subject: [PATCH] =?UTF-8?q?Revert=20"updated=20DataReference=20component?= =?UTF-8?q?=20to=20make=20get=20datapage=20call=20after=20on=20ch=E2=80=A6?= =?UTF-8?q?"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit 0d93b214fab9ae92e5f0693174c79b8695d35855. --- .../data-reference.component.ts | 39 +++++++++---------- 1 file changed, 18 insertions(+), 21 deletions(-) diff --git a/packages/angular-sdk-components/src/lib/_components/template/data-reference/data-reference.component.ts b/packages/angular-sdk-components/src/lib/_components/template/data-reference/data-reference.component.ts index c6ca3804..715dc013 100644 --- a/packages/angular-sdk-components/src/lib/_components/template/data-reference/data-reference.component.ts +++ b/packages/angular-sdk-components/src/lib/_components/template/data-reference/data-reference.component.ts @@ -69,27 +69,7 @@ export class DataReferenceComponent implements OnInit, OnDestroy { this.angularPConnectData = this.angularPConnect.registerAndSubscribeComponent(this, this.onStateChange); this.children = this.pConn$.getChildren(); this.updateSelf(); - } - - ngOnDestroy(): void { - if (this.angularPConnectData.unsubscribeFn) { - this.angularPConnectData.unsubscribeFn(); - } - } - - // Callback passed when subscribing to store change - onStateChange() { - // Should always check the bridge to see if the component should - // update itself (re-render) - const bUpdateSelf = this.angularPConnect.shouldComponentUpdate(this); - - // ONLY call updateSelf when the component should update - if (bUpdateSelf) { - this.updateSelf(); - } - } - getData() { if ( this.rawViewMetadata.config?.parameters && !this.isDDSourceDeferred && @@ -130,6 +110,24 @@ export class DataReferenceComponent implements OnInit, OnDestroy { } } + ngOnDestroy(): void { + if (this.angularPConnectData.unsubscribeFn) { + this.angularPConnectData.unsubscribeFn(); + } + } + + // Callback passed when subscribing to store change + onStateChange() { + // Should always check the bridge to see if the component should + // update itself (re-render) + const bUpdateSelf = this.angularPConnect.shouldComponentUpdate(this); + + // ONLY call updateSelf when the component should update + if (bUpdateSelf) { + this.updateSelf(); + } + } + updateSelf() { // Update properties based on configProps const theConfigProps = this.pConn$.getConfigProps(); @@ -188,7 +186,6 @@ export class DataReferenceComponent implements OnInit, OnDestroy { this.generateChildrenToRender(); this.displayChild = !(this.displaySingleRef || this.displayMultiRef); - this.getData(); } updatePropertiesFromProps(theConfigProps) {