@pega/angular-sdk-overrides 0.23.13 → 0.23.14
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.
|
@@ -276,25 +276,39 @@ export class DropdownComponent implements OnInit, OnDestroy {
|
|
|
276
276
|
|
|
277
277
|
columns = preProcessColumns(columns) || [];
|
|
278
278
|
if (!this.displayMode$ && listType !== 'associated' && typeof datasource === 'string') {
|
|
279
|
-
this.getData(datasource, parameters, columns, context);
|
|
279
|
+
this.getData(datasource, parameters, columns, context, listType);
|
|
280
280
|
}
|
|
281
281
|
}
|
|
282
282
|
|
|
283
|
-
getData(
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
283
|
+
getData(dataSource, parameters, columns, context, listType) {
|
|
284
|
+
const dataConfig: any = {
|
|
285
|
+
columns,
|
|
286
|
+
dataSource,
|
|
287
|
+
deferDatasource: true,
|
|
288
|
+
listType,
|
|
289
|
+
parameters,
|
|
290
|
+
matchPosition: 'contains',
|
|
291
|
+
maxResultsDisplay: '5000',
|
|
292
|
+
cacheLifeSpan: 'form'
|
|
293
|
+
};
|
|
294
|
+
PCore.getDataApi()
|
|
295
|
+
.init(dataConfig, context)
|
|
296
|
+
.then((dataApiObj: any) => {
|
|
297
|
+
const optionsData: any[] = [];
|
|
298
|
+
const displayColumn = getDisplayFieldsMetaData(columns);
|
|
299
|
+
dataApiObj.fetchData('').then(response => {
|
|
300
|
+
response.data?.forEach(element => {
|
|
301
|
+
const val = element[displayColumn.primary]?.toString();
|
|
302
|
+
const obj = {
|
|
303
|
+
key: element[displayColumn.key] || element.pyGUID,
|
|
304
|
+
value: val
|
|
305
|
+
};
|
|
306
|
+
optionsData.push(obj);
|
|
307
|
+
});
|
|
308
|
+
optionsData?.unshift({ key: 'Select', value: this.pConn$.getLocalizedValue('Select...', '', '') });
|
|
309
|
+
this.options$ = optionsData;
|
|
310
|
+
});
|
|
294
311
|
});
|
|
295
|
-
optionsData?.unshift({ key: 'Select', value: this.pConn$.getLocalizedValue('Select...', '', '') });
|
|
296
|
-
this.options$ = optionsData;
|
|
297
|
-
});
|
|
298
312
|
}
|
|
299
313
|
|
|
300
314
|
isSelected(buttonValue: string): boolean {
|