@coreui/angular-pro 4.1.0-next.2 → 4.1.0-next.3
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.
- package/esm2020/lib/smart-table/smart-table/smart-table.component.mjs +24 -5
- package/fesm2015/coreui-angular-pro.mjs +23 -4
- package/fesm2015/coreui-angular-pro.mjs.map +1 -1
- package/fesm2020/coreui-angular-pro.mjs +23 -4
- package/fesm2020/coreui-angular-pro.mjs.map +1 -1
- package/lib/smart-table/smart-table/smart-table.component.d.ts +3 -1
- package/package.json +1 -1
|
@@ -11233,7 +11233,9 @@ class SmartTableComponent {
|
|
|
11233
11233
|
this.tableFilterValueChange = new EventEmitter();
|
|
11234
11234
|
this.templates = { tableDetails: null, tableData: null };
|
|
11235
11235
|
this._selectedAll = false;
|
|
11236
|
-
this.
|
|
11236
|
+
this._columnFiltered = [];
|
|
11237
|
+
this.itemsDiffer = this.iterableDiffers.find(this.items).create();
|
|
11238
|
+
this.itemsFilteredDiffer = this.iterableDiffers.find(this._columnFiltered).create();
|
|
11237
11239
|
this.columFilterValueDiffer = this.keyValueDiffers.find(this.columnFilterValue).create();
|
|
11238
11240
|
}
|
|
11239
11241
|
set activePage(value) {
|
|
@@ -11287,7 +11289,12 @@ class SmartTableComponent {
|
|
|
11287
11289
|
return this._header;
|
|
11288
11290
|
}
|
|
11289
11291
|
set items(value) {
|
|
11290
|
-
|
|
11292
|
+
if (this.itemsDiffer) {
|
|
11293
|
+
const changes = this.itemsDiffer.diff(value);
|
|
11294
|
+
if (changes) {
|
|
11295
|
+
this._items = this.setItems(value);
|
|
11296
|
+
}
|
|
11297
|
+
}
|
|
11291
11298
|
}
|
|
11292
11299
|
get items() {
|
|
11293
11300
|
return this._items;
|
|
@@ -11408,6 +11415,7 @@ class SmartTableComponent {
|
|
|
11408
11415
|
if (this.columnFilter &&
|
|
11409
11416
|
typeof this.columnFilter === 'object' &&
|
|
11410
11417
|
this.columnFilter.external) {
|
|
11418
|
+
this._columnFiltered = _items;
|
|
11411
11419
|
// @ts-ignore
|
|
11412
11420
|
return _items;
|
|
11413
11421
|
}
|
|
@@ -11420,6 +11428,7 @@ class SmartTableComponent {
|
|
|
11420
11428
|
});
|
|
11421
11429
|
}
|
|
11422
11430
|
});
|
|
11431
|
+
this._columnFiltered = _items;
|
|
11423
11432
|
// @ts-ignore
|
|
11424
11433
|
return _items;
|
|
11425
11434
|
}
|
|
@@ -11427,7 +11436,12 @@ class SmartTableComponent {
|
|
|
11427
11436
|
let items = this.columnFiltered;
|
|
11428
11437
|
if (!this.tableFilterState ||
|
|
11429
11438
|
(this.tableFilter && typeof this.tableFilter === 'object' && this.tableFilter.external)) {
|
|
11430
|
-
this.
|
|
11439
|
+
if (this.itemsFilteredDiffer) {
|
|
11440
|
+
const changes = this.itemsFilteredDiffer.diff(items);
|
|
11441
|
+
if (changes) {
|
|
11442
|
+
this.filteredItemsChange.emit(items);
|
|
11443
|
+
}
|
|
11444
|
+
}
|
|
11431
11445
|
return items;
|
|
11432
11446
|
}
|
|
11433
11447
|
const filter = this.tableFilterState.toLowerCase();
|
|
@@ -11436,7 +11450,12 @@ class SmartTableComponent {
|
|
|
11436
11450
|
items = items.filter((item) => {
|
|
11437
11451
|
return !!this.itemsDataColumns.find((key) => valueContainFilter(item[key]));
|
|
11438
11452
|
});
|
|
11439
|
-
this.
|
|
11453
|
+
if (this.itemsFilteredDiffer) {
|
|
11454
|
+
const changes = this.itemsFilteredDiffer.diff(items);
|
|
11455
|
+
if (changes) {
|
|
11456
|
+
this.filteredItemsChange.emit(items);
|
|
11457
|
+
}
|
|
11458
|
+
}
|
|
11440
11459
|
return items;
|
|
11441
11460
|
}
|
|
11442
11461
|
get isFiltered() {
|