@acorex/data-grid 16.20.7 → 16.20.9

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.
@@ -1,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { TemplateRef, ContentChild, Component, input, Input, Directive, ViewEncapsulation, ChangeDetectionStrategy, ViewContainerRef, ViewChild, ContentChildren, EventEmitter, Output, ElementRef, inject, output, NgModule } from '@angular/core';
2
+ import { TemplateRef, ContentChild, Component, input, Input, Directive, ViewEncapsulation, ChangeDetectionStrategy, ViewContainerRef, ViewChild, ContentChildren, EventEmitter, Output, ElementRef, inject, signal, output, NgModule } from '@angular/core';
3
3
  import { AXConfig, AXDateTime, AXTranslator, AXCoreModule } from '@acorex/core';
4
4
  import * as i1 from '@angular/common';
5
5
  import { CommonModule } from '@angular/common';
@@ -1033,6 +1033,7 @@ class AXDataGridComponent {
1033
1033
  }
1034
1034
  gridApi;
1035
1035
  dataSourceSuccessCallback;
1036
+ params = signal(null, ...(ngDevMode ? [{ debugName: "params" }] : []));
1036
1037
  localeText;
1037
1038
  isInitialLoad = true;
1038
1039
  gridOptions;
@@ -1190,6 +1191,7 @@ class AXDataGridComponent {
1190
1191
  return {
1191
1192
  rowCount: null,
1192
1193
  getRows: (params) => {
1194
+ that.params.set(params);
1193
1195
  that.dataSourceSuccessCallback = params.success;
1194
1196
  const loadParams = {};
1195
1197
  loadParams.searchText = that.searchText;
@@ -1440,6 +1442,14 @@ class AXDataGridComponent {
1440
1442
  }
1441
1443
  this.gridSelectRow();
1442
1444
  });
1445
+ this.dataSource.onFetchError.subscribe((err) => {
1446
+ if (this.dataSourceSuccessCallback) {
1447
+ this.dataSourceSuccessCallback = null;
1448
+ }
1449
+ if (this.intenalGridDataSource && this.params()) {
1450
+ this.params().fail();
1451
+ }
1452
+ });
1443
1453
  this.showLoading(true);
1444
1454
  this.dataSource.onFetchStart.subscribe(() => {
1445
1455
  this.showLoading(false);