Skip to content

Commit c23f42e

Browse files
committed
fix: incorrect referenceList value in refresh api payload on opening dialog
1 parent cb1ed12 commit c23f42e

File tree

4 files changed

+17
-12
lines changed

4 files changed

+17
-12
lines changed

packages/angular-sdk-components/src/lib/_components/infra/assignment-card/assignment-card.component.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
<div class="psdk-case-view-divider"></div>
1919

2020
<component-mapper
21+
*ngIf="arMainButtons$ && arSecondaryButtons$"
2122
name="ActionButtons"
2223
[props]="{ arMainButtons$, arSecondaryButtons$ }"
2324
[parent]="this"

packages/angular-sdk-components/src/lib/_components/infra/reference/reference.component.ts

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -161,8 +161,12 @@ export class ReferenceComponent {
161161
return inPConnArray;
162162
}
163163

164-
return inPConnArray.map(child => {
165-
return ReferenceComponent.normalizePConn(child);
166-
});
164+
return (
165+
inPConnArray
166+
.map(child => {
167+
return ReferenceComponent.normalizePConn(child);
168+
})
169+
.filter(Boolean) || []
170+
); // Ensure we return an empty array if all children are filtered out
167171
}
168172
}

packages/angular-sdk-components/src/lib/_components/template/default-form/default-form.component.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -86,10 +86,8 @@ export class DefaultFormComponent extends FormTemplateBase implements OnInit {
8686
// normalize them
8787
const children = ReferenceComponent.normalizePConnArray(kids[0].getPConnect().getChildren());
8888

89-
const visibleChildren = children.filter(child => child !== undefined);
90-
91-
if (areViewsChanged(this.arChildren$, visibleChildren)) {
92-
this.arChildren$ = visibleChildren;
89+
if (areViewsChanged(this.arChildren$, children)) {
90+
this.arChildren$ = children;
9391
}
9492
}
9593
}

packages/angular-sdk-components/src/lib/_components/template/simple-table-manual/helpers.ts

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -44,18 +44,20 @@ function getFieldWidth(field, label) {
4444
export const getContext = thePConn => {
4545
const contextName = thePConn.getContextName();
4646
const pageReference = thePConn.getPageReference();
47-
// 8.7 change = referenceList may now be in top-level of state props,
48-
// not always in config of state props
49-
let { referenceList } = thePConn.getStateProps()?.config || thePConn.getStateProps();
47+
const { readonlyContextList, referenceList = readonlyContextList } = thePConn.getStateProps()?.config || thePConn.getStateProps();
48+
5049
const pageReferenceForRows = referenceList.startsWith('.') ? `${pageReference}.${referenceList.substring(1)}` : referenceList;
50+
const viewName = thePConn.viewName;
5151

5252
// removing "caseInfo.content" prefix to avoid setting it as a target while preparing pageInstructions
53-
referenceList = pageReferenceForRows.replace(PCore.getConstants().CASE_INFO.CASE_INFO_CONTENT, '');
53+
// skipping the removal as StateMachine itself is removing this case info prefix while preparing pageInstructions
54+
// referenceList = pageReferenceForRows.replace(PCore.getConstants().CASE_INFO.CASE_INFO_CONTENT, '');
5455

5556
return {
5657
contextName,
5758
referenceListStr: referenceList,
58-
pageReferenceForRows
59+
pageReferenceForRows,
60+
viewName
5961
};
6062
};
6163

0 commit comments

Comments
 (0)