@pega/react-sdk-overrides 0.23.32 → 0.23.33
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.
|
@@ -132,7 +132,7 @@ export const buildFieldsForTable = (configFields, fields, showDeleteButton) => {
|
|
|
132
132
|
type: 'text',
|
|
133
133
|
label: fields[index].config.label || fields[index].config.caption,
|
|
134
134
|
fillAvailableSpace: !!field.config.fillAvailableSpace,
|
|
135
|
-
id: index
|
|
135
|
+
id: `${index}`,
|
|
136
136
|
name: field.config.value.substr(4),
|
|
137
137
|
cellRenderer: TABLE_CELL,
|
|
138
138
|
sort: false,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/* eslint-disable no-nested-ternary */
|
|
2
|
-
import React, { PropsWithChildren, useEffect, useRef, useState } from 'react';
|
|
2
|
+
import React, { PropsWithChildren, useEffect, useLayoutEffect, useRef, useState } from 'react';
|
|
3
3
|
import Table from '@material-ui/core/Table';
|
|
4
4
|
import TableBody from '@material-ui/core/TableBody';
|
|
5
5
|
import TableCell from '@material-ui/core/TableCell';
|
|
@@ -197,6 +197,20 @@ export default function SimpleTableManual(props: PropsWithChildren<SimpleTableMa
|
|
|
197
197
|
// Constellation DX Components.
|
|
198
198
|
const fieldDefs = buildFieldsForTable(rawFields, resolvedFields, showDeleteButton);
|
|
199
199
|
|
|
200
|
+
useLayoutEffect(() => {
|
|
201
|
+
if (allowEditingInModal) {
|
|
202
|
+
getPConnect()
|
|
203
|
+
.getListActions()
|
|
204
|
+
.initDefaultPageInstructions(
|
|
205
|
+
getPConnect().getReferenceList(),
|
|
206
|
+
fieldDefs.filter(item => item.name).map(item => item.name)
|
|
207
|
+
);
|
|
208
|
+
} else {
|
|
209
|
+
// @ts-ignore - An argument for 'fields' was not provided
|
|
210
|
+
getPConnect().getListActions().initDefaultPageInstructions(getPConnect().getReferenceList());
|
|
211
|
+
}
|
|
212
|
+
}, []);
|
|
213
|
+
|
|
200
214
|
const displayedColumns = fieldDefs.map(field => {
|
|
201
215
|
return field.name ? field.name : field.cellRenderer;
|
|
202
216
|
});
|
|
@@ -290,6 +304,10 @@ export default function SimpleTableManual(props: PropsWithChildren<SimpleTableMa
|
|
|
290
304
|
} else {
|
|
291
305
|
pConn.getListActions().insert({ classID: contextClass }, referenceList.length);
|
|
292
306
|
}
|
|
307
|
+
|
|
308
|
+
getPConnect().clearErrorMessages({
|
|
309
|
+
property: (getPConnect().getStateProps() as any)?.referenceList?.substring(1)
|
|
310
|
+
} as any);
|
|
293
311
|
};
|
|
294
312
|
|
|
295
313
|
const editRecord = () => {
|
package/package.json
CHANGED