@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(datasource, parameters, columns, context) {
284
- this.dataPageService.getDataPageData(datasource, parameters, context).then((results: any) => {
285
- const optionsData: any[] = [];
286
- const displayColumn = getDisplayFieldsMetaData(columns);
287
- results?.forEach(element => {
288
- const val = element[displayColumn.primary]?.toString();
289
- const obj = {
290
- key: element[displayColumn.key] || element.pyGUID,
291
- value: val
292
- };
293
- optionsData.push(obj);
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 {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pega/angular-sdk-overrides",
3
- "version": "0.23.13",
3
+ "version": "0.23.14",
4
4
  "description": "Angular SDK - Code for overriding components",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1"