@onecx/angular-accelerator 6.14.4 → 6.15.0
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.
|
@@ -2610,7 +2610,9 @@ class DataTableComponent extends DataSortBase {
|
|
|
2610
2610
|
return this._rows$.getValue();
|
|
2611
2611
|
}
|
|
2612
2612
|
set rows(value) {
|
|
2613
|
-
|
|
2613
|
+
if (this._rows$.getValue().length > value.length) {
|
|
2614
|
+
this.resetPage();
|
|
2615
|
+
}
|
|
2614
2616
|
this._rows$.next(value);
|
|
2615
2617
|
const currentResults = value.length;
|
|
2616
2618
|
const newStatus = currentResults === 0
|
|
@@ -2632,7 +2634,9 @@ class DataTableComponent extends DataSortBase {
|
|
|
2632
2634
|
return this._filters$.getValue();
|
|
2633
2635
|
}
|
|
2634
2636
|
set filters(value) {
|
|
2635
|
-
|
|
2637
|
+
if (this._filters$.getValue().length) {
|
|
2638
|
+
this.resetPage();
|
|
2639
|
+
}
|
|
2636
2640
|
this._filters$.next(value);
|
|
2637
2641
|
}
|
|
2638
2642
|
get sortDirection() {
|
|
@@ -2864,7 +2868,7 @@ class DataTableComponent extends DataSortBase {
|
|
|
2864
2868
|
[TemplateType.CELL]: this.cellTemplatesData,
|
|
2865
2869
|
[TemplateType.FILTERCELL]: this.filterTemplatesData,
|
|
2866
2870
|
};
|
|
2867
|
-
this.rowTrackByFunction = (item) => {
|
|
2871
|
+
this.rowTrackByFunction = (index, item) => {
|
|
2868
2872
|
return item.id;
|
|
2869
2873
|
};
|
|
2870
2874
|
this.name = this.name || this.router.url.replace(/[^A-Za-z0-9]/, '_');
|