@pega/react-sdk-overrides 0.23.9 → 0.23.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -29,7 +29,7 @@ const FieldGroupList = props => {
29
29
  type='button'
30
30
  style={{ float: 'right' }}
31
31
  className='psdk-utility-button'
32
- id={`delete-row-${Utils.getLastChar(item.name)}`}
32
+ id={`delete-row-${item.id}`}
33
33
  onClick={() => {
34
34
  props.onDelete(item.id);
35
35
  }}
@@ -17,6 +17,7 @@ export default function FieldGroupTemplate(props) {
17
17
  lookForChildInConfig,
18
18
  heading,
19
19
  displayMode,
20
+ fieldHeader,
20
21
  allowTableEdit: allowAddEdit
21
22
  } = props;
22
23
  const pConn = getPConnect();
@@ -26,13 +27,20 @@ export default function FieldGroupTemplate(props) {
26
27
  const isReadonlyMode = renderMode === 'ReadOnly' || displayMode === 'LABELS_LEFT';
27
28
  const HEADING = heading ?? 'Row';
28
29
 
30
+ const getDynamicHeaderProp = (item, index) => {
31
+ if (fieldHeader === 'propertyRef' && heading && item[heading.substring(1)]) {
32
+ return item[heading.substring(1)];
33
+ }
34
+ return `Row ${index + 1}`;
35
+ };
36
+
29
37
  const addRecord = () => {
30
38
  if (PCore.getPCoreVersion()?.includes('8.7')) {
31
39
  pConn.getListActions().insert({ classID: contextClass }, referenceList.length, pageReference);
32
40
  } else {
33
41
  pConn.getListActions().insert({ classID: contextClass }, referenceList.length);
34
42
  }
35
- }
43
+ };
36
44
 
37
45
  if (!isReadonlyMode) {
38
46
  const addFieldGroupItem = () => {
@@ -52,7 +60,10 @@ export default function FieldGroupTemplate(props) {
52
60
  const MemoisedChildren = useMemo(() => {
53
61
  return referenceList.map((item, index) => ({
54
62
  id: index,
55
- name: `${HEADING} ${index + 1}`,
63
+ name:
64
+ fieldHeader === 'propertyRef'
65
+ ? getDynamicHeaderProp(item, index)
66
+ : `${HEADING} ${index + 1}`,
56
67
  children: buildView(pConn, index, lookForChildInConfig)
57
68
  }));
58
69
  }, [referenceList?.length]);
File without changes
File without changes
File without changes
@@ -8,7 +8,7 @@ import './FileUtility.css';
8
8
  import { IconButton, Menu, MenuItem } from '@material-ui/core';
9
9
  import MoreVertIcon from '@material-ui/icons/MoreVert';
10
10
  import { Button } from '@material-ui/core';
11
- import { validateMaxSize } from '@pega/react-sdk-components/lib/components/infra/Attachment/AttachmentUtils';
11
+ import { validateMaxSize } from '@pega/react-sdk-components/lib/components/widgets/Attachment/AttachmentUtils';
12
12
  import { CircularProgress } from "@material-ui/core";
13
13
 
14
14
  declare const PCore;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pega/react-sdk-overrides",
3
- "version": "0.23.9",
3
+ "version": "0.23.10",
4
4
  "description": "React SDK - Code for overriding components",
5
5
  "_filesComment": "During packing, npm ignores everything NOT in the files list",
6
6
  "files": [