@pega/react-sdk-overrides 0.23.15 → 0.23.16

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.
@@ -50,11 +50,11 @@ export default function AutoComplete(props) {
50
50
  deferDatasource,
51
51
  datasourceMetadata,
52
52
  status,
53
- helperText
53
+ helperText,
54
+ onRecordChange
54
55
  } = props;
55
- let parameters = datasourceMetadata?.datasource?.parameters;
56
56
  const context = getPConnect().getContextName();
57
- let { listType, datasource = [], columns = [] } = props;
57
+ let { listType, parameters, datasource = [], columns = [] } = props;
58
58
  const [inputValue, setInputValue] = useState('');
59
59
  const [options, setOptions] = useState<Array<IOption>>([]);
60
60
  const [theDatasource, setDatasource] = useState(null);
@@ -85,7 +85,7 @@ export default function AutoComplete(props) {
85
85
  if (deferDatasource && datasourceMetadata?.datasource?.name) {
86
86
  listType = 'datapage';
87
87
  datasource = datasourceMetadata.datasource.name;
88
- parameters = flattenParameters(parameters);
88
+ parameters = flattenParameters(datasourceMetadata?.datasource?.parameters);
89
89
  const displayProp = datasourceMetadata.datasource.propertyForDisplayText.startsWith('@P')
90
90
  ? datasourceMetadata.datasource.propertyForDisplayText.substring(3)
91
91
  : datasourceMetadata.datasource.propertyForDisplayText;
@@ -151,6 +151,9 @@ export default function AutoComplete(props) {
151
151
  const handleChange = (event: object, newValue) => {
152
152
  const val = newValue ? newValue.key : '';
153
153
  handleEvent(actionsApi, 'changeNblur', propName, val);
154
+ if (onRecordChange) {
155
+ onRecordChange(event);
156
+ }
154
157
  };
155
158
 
156
159
  const handleInputValue = (event, newInputValue) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pega/react-sdk-overrides",
3
- "version": "0.23.15",
3
+ "version": "0.23.16",
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": [