osl-base-extended 1.0.43 → 1.0.45

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.
@@ -398,7 +398,7 @@ class DatasourceCacheService {
398
398
  const response = body !== undefined
399
399
  ? await service[methodName](body)
400
400
  : await service[methodName]();
401
- const data = Array.isArray(response) ? response : (response?.result?.data ?? []);
401
+ const data = Array.isArray(response) ? response : (response?.result ?? []);
402
402
  this.cache.set(key, data);
403
403
  return data;
404
404
  }
@@ -1444,8 +1444,8 @@ class OslAutocomplete extends baseComponent {
1444
1444
  const res = await this.service[this.methodName](value);
1445
1445
  if (!res.isSuccessful)
1446
1446
  return;
1447
- this.datasource = res?.result?.data;
1448
- this.filteredItems = res?.result?.data;
1447
+ this.datasource = res?.result && Array.isArray(res?.result) ? res?.result : res?.result?.data;
1448
+ this.filteredItems = this.datasource;
1449
1449
  this.cdr.markForCheck();
1450
1450
  });
1451
1451
  if (this.object) {