From d88fa458982c4d1393d684ba8570dada2dd6114b Mon Sep 17 00:00:00 2001 From: samhere06 Date: Fri, 22 May 2026 15:43:46 +0530 Subject: [PATCH 1/2] updated DataReference component to make get datapage call after on change --- .../data-reference.component.ts | 41 +++++++++++-------- 1 file changed, 23 insertions(+), 18 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 715dc013..a4939811 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 @@ -70,6 +70,28 @@ export class DataReferenceComponent implements OnInit, OnDestroy { 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 && @@ -110,24 +132,6 @@ 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(); @@ -186,6 +190,7 @@ export class DataReferenceComponent implements OnInit, OnDestroy { this.generateChildrenToRender(); this.displayChild = !(this.displaySingleRef || this.displayMultiRef); + this.getData(); } updatePropertiesFromProps(theConfigProps) { From b14a38f75d704ce86629f85bb42e6804bbeca046 Mon Sep 17 00:00:00 2001 From: samhere06 Date: Fri, 22 May 2026 15:49:52 +0530 Subject: [PATCH 2/2] lint fix --- .../template/data-reference/data-reference.component.ts | 4 +--- 1 file changed, 1 insertion(+), 3 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 a4939811..c6ca3804 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,8 +69,6 @@ export class DataReferenceComponent implements OnInit, OnDestroy { this.angularPConnectData = this.angularPConnect.registerAndSubscribeComponent(this, this.onStateChange); this.children = this.pConn$.getChildren(); this.updateSelf(); - - } ngOnDestroy(): void { @@ -91,7 +89,7 @@ export class DataReferenceComponent implements OnInit, OnDestroy { } } - getData(){ + getData() { if ( this.rawViewMetadata.config?.parameters && !this.isDDSourceDeferred &&