@firestitch/list 12.3.3 → 12.3.4
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/app/classes/list-controller.d.ts +6 -0
- package/bundles/firestitch-list.umd.js +23 -7
- package/bundles/firestitch-list.umd.js.map +1 -1
- package/esm2015/app/classes/list-controller.js +22 -7
- package/fesm2015/firestitch-list.js +21 -6
- package/fesm2015/firestitch-list.js.map +1 -1
- package/package.json +1 -1
|
@@ -128,6 +128,11 @@ export declare class List {
|
|
|
128
128
|
*/
|
|
129
129
|
private listenFetch;
|
|
130
130
|
private listenRowsRemove;
|
|
131
|
+
/**
|
|
132
|
+
* Lister may have originally hidden columns, but visibility of those columns
|
|
133
|
+
* can be changed programmaticaly in any time
|
|
134
|
+
*/
|
|
135
|
+
private _listenVisibleColumnChanges;
|
|
131
136
|
private initInfinityScroll;
|
|
132
137
|
/**
|
|
133
138
|
* Update and watch filter changes
|
|
@@ -165,4 +170,5 @@ export declare class List {
|
|
|
165
170
|
* @param row
|
|
166
171
|
*/
|
|
167
172
|
private restoreClick;
|
|
173
|
+
private _updateSortingColumns;
|
|
168
174
|
}
|
|
@@ -3522,7 +3522,6 @@
|
|
|
3522
3522
|
* @param templates
|
|
3523
3523
|
*/
|
|
3524
3524
|
List.prototype.tranformTemplatesToColumns = function (templates) {
|
|
3525
|
-
var _this = this;
|
|
3526
3525
|
var defaultConfigs = {
|
|
3527
3526
|
header: this._headerConfig,
|
|
3528
3527
|
groupCell: this._groupCellConfig,
|
|
@@ -3532,12 +3531,7 @@
|
|
|
3532
3531
|
this.columns.setDefaults(defaultConfigs);
|
|
3533
3532
|
this.columns.initializeColumns(templates);
|
|
3534
3533
|
// Set sortBy default column
|
|
3535
|
-
this.
|
|
3536
|
-
this.columns.columns
|
|
3537
|
-
.filter(function (column) { return column.sortable && column.visible; })
|
|
3538
|
-
.forEach(function (column) {
|
|
3539
|
-
_this.sorting.addSortableColumn(column);
|
|
3540
|
-
});
|
|
3534
|
+
this._updateSortingColumns();
|
|
3541
3535
|
// Default sort by
|
|
3542
3536
|
var externalSorting = this.externalParams.externalSorting;
|
|
3543
3537
|
var initialSortConfig = externalSorting || this.config.sort;
|
|
@@ -3614,6 +3608,7 @@
|
|
|
3614
3608
|
_this.fetch$.next();
|
|
3615
3609
|
}
|
|
3616
3610
|
});
|
|
3611
|
+
this._listenVisibleColumnChanges();
|
|
3617
3612
|
this.listenRowsRemove();
|
|
3618
3613
|
this.listenFetch();
|
|
3619
3614
|
};
|
|
@@ -3906,6 +3901,18 @@
|
|
|
3906
3901
|
}
|
|
3907
3902
|
});
|
|
3908
3903
|
};
|
|
3904
|
+
/**
|
|
3905
|
+
* Lister may have originally hidden columns, but visibility of those columns
|
|
3906
|
+
* can be changed programmaticaly in any time
|
|
3907
|
+
*/
|
|
3908
|
+
List.prototype._listenVisibleColumnChanges = function () {
|
|
3909
|
+
var _this = this;
|
|
3910
|
+
this.columns.visibleColumns$
|
|
3911
|
+
.pipe(operators.takeUntil(this.onDestroy$))
|
|
3912
|
+
.subscribe(function () {
|
|
3913
|
+
_this._updateSortingColumns();
|
|
3914
|
+
});
|
|
3915
|
+
};
|
|
3909
3916
|
List.prototype.initInfinityScroll = function () {
|
|
3910
3917
|
var _this = this;
|
|
3911
3918
|
if (this.fsScrollInstance) {
|
|
@@ -4141,6 +4148,15 @@
|
|
|
4141
4148
|
});
|
|
4142
4149
|
}
|
|
4143
4150
|
};
|
|
4151
|
+
List.prototype._updateSortingColumns = function () {
|
|
4152
|
+
var _this = this;
|
|
4153
|
+
this.sorting.clearSortableColumns();
|
|
4154
|
+
this.columns.columns
|
|
4155
|
+
.filter(function (column) { return column.sortable && column.visible; })
|
|
4156
|
+
.forEach(function (column) {
|
|
4157
|
+
_this.sorting.addSortableColumn(column);
|
|
4158
|
+
});
|
|
4159
|
+
};
|
|
4144
4160
|
return List;
|
|
4145
4161
|
}());
|
|
4146
4162
|
|