Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@
* Github: [PR-576](https://github.com/pegasystems/angular-sdk-components/pull/576)

### **Bug fixes**
* **Fixed DataReference not making an api call on state change.**
* Github: [PR-486](https://github.com/pegasystems/angular-sdk-components/pull/486)
* **Fixed the issue where views are not rendering in Details Template.**
* Github: [PR-533](https://github.com/pegasystems/angular-sdk-components/pull/533)
* **Fixed an issue where FieldGroup visibility was not worked correctly.**
Expand All @@ -42,7 +44,8 @@
* **Fixed the issue where changing a property value on the screen was not reflected in the list below.**
* Github: [PR-581](https://github.com/pegasystems/angular-sdk-components/pull/581)
* **Fixed search form label issue, fallback to inherited label when config label is missing.**
* Github: [PR-581](https://github.com/pegasystems/angular-sdk-components/pull/582)
* Github: [PR-582](https://github.com/pegasystems/angular-sdk-components/pull/582)


# [25.1.13](https://github.com/pegasystems/angular-sdk/tree/release/25.1.13) - Released: 12/06/2026

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ export class DataReferenceComponent implements OnInit, OnDestroy {
dataRelationshipContext: any;
imagePosition: any;
showImageDescription: any;
private isUpdatingFromDataCallback = false;

constructor(
private angularPConnect: AngularPConnectService,
Expand All @@ -69,7 +70,30 @@ 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.isUpdatingFromDataCallback) {
return;
}
if (
this.rawViewMetadata.config?.parameters &&
!this.isDDSourceDeferred &&
Expand All @@ -94,7 +118,9 @@ export class DataReferenceComponent implements OnInit, OnDestroy {
}))
.filter(item => item.key); // Filtering out undefined entries
this.dropDownDataSource = ddDataSource;
this.isUpdatingFromDataCallback = true;
this.updateSelf();
this.isUpdatingFromDataCallback = false;
} else {
const ddDataSource: any = [];
this.dropDownDataSource = ddDataSource;
Expand All @@ -110,24 +136,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();
Expand Down Expand Up @@ -186,6 +194,7 @@ export class DataReferenceComponent implements OnInit, OnDestroy {

this.generateChildrenToRender();
this.displayChild = !(this.displaySingleRef || this.displayMultiRef);
this.getData();
}

updatePropertiesFromProps(theConfigProps) {
Expand Down
Loading