osl-base-extended 1.0.23 → 1.0.25

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.
@@ -1427,6 +1427,8 @@ class OslAutocomplete extends baseComponent {
1427
1427
  this.inputControl.valueChanges
1428
1428
  .pipe(debounceTime(500), distinctUntilChanged())
1429
1429
  .subscribe(async (value) => {
1430
+ if (!value)
1431
+ return;
1430
1432
  const res = await this.service[this.methodName](value);
1431
1433
  if (!res.isSuccessful)
1432
1434
  return;
@@ -2549,11 +2551,11 @@ class OslAutocompleteLister {
2549
2551
  this.cd.markForCheck();
2550
2552
  if (!res.isSuccessful)
2551
2553
  return;
2552
- this.datasource = res.result;
2554
+ this.datasource = res.result?.data || [];
2553
2555
  setTimeout(() => {
2554
2556
  this.loader = false;
2555
2557
  }, 20);
2556
- this.recordCount = Number(res.headers?.get('recordCount') || 0);
2558
+ this.recordCount = res.result?.recordsFiltered;
2557
2559
  }
2558
2560
  onPageChange(event) {
2559
2561
  this.search(event.searchValue, event.page, event.pageSize);