@stemy/ngx-utils 19.0.6 → 19.0.7
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.
|
@@ -5434,6 +5434,11 @@ class DynamicTableComponent {
|
|
|
5434
5434
|
}, {});
|
|
5435
5435
|
this.cols = Object.keys(this.realColumns);
|
|
5436
5436
|
this.orderBy = this.orderBy in this.realColumns ? this.orderBy : this.cols[0];
|
|
5437
|
+
this.query = this.cols.reduce((res, c) => {
|
|
5438
|
+
const col = this.realColumns[c];
|
|
5439
|
+
res[c] = col.filterType == "checkbox" ? false : "";
|
|
5440
|
+
return res;
|
|
5441
|
+
}, {});
|
|
5437
5442
|
}
|
|
5438
5443
|
this.hasQuery = this.cols.some(col => this.realColumns[col].filter);
|
|
5439
5444
|
if (changes.orderBy && this.realColumns) {
|
|
@@ -5457,12 +5462,18 @@ class DynamicTableComponent {
|
|
|
5457
5462
|
this.orderBy = column;
|
|
5458
5463
|
this.refresh();
|
|
5459
5464
|
}
|
|
5460
|
-
updateQuery(
|
|
5461
|
-
|
|
5462
|
-
|
|
5465
|
+
updateQuery(c, value) {
|
|
5466
|
+
const col = this.realColumns[c];
|
|
5467
|
+
if (!col)
|
|
5468
|
+
return;
|
|
5469
|
+
if (col.filterType === "checkbox") {
|
|
5470
|
+
this.query[c] = !this.query[c];
|
|
5471
|
+
}
|
|
5472
|
+
else if (!value) {
|
|
5473
|
+
delete this.query[c];
|
|
5463
5474
|
}
|
|
5464
5475
|
else {
|
|
5465
|
-
this.query[
|
|
5476
|
+
this.query[c] = value;
|
|
5466
5477
|
}
|
|
5467
5478
|
this.refresh(this.filterTime ?? 300);
|
|
5468
5479
|
}
|