tuain-ng-forms-lib 12.0.66 → 12.0.67
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/bundles/tuain-ng-forms-lib.umd.js +12 -15
- package/bundles/tuain-ng-forms-lib.umd.js.map +1 -1
- package/esm2015/lib/classes/forms/table/table.js +8 -15
- package/esm2015/lib/components/elements/tables/table.component.js +2 -2
- package/fesm2015/tuain-ng-forms-lib.js +8 -15
- package/fesm2015/tuain-ng-forms-lib.js.map +1 -1
- package/lib/classes/forms/table/table.d.ts +2 -2
- package/lib/components/elements/tables/table.component.d.ts +1 -1
- package/package.json +1 -1
|
@@ -718,7 +718,10 @@
|
|
|
718
718
|
LibTableComponent.prototype.toggleSelectAll = function () { return (this.allSelected) ? this.table.unSelectAll() : this.table.selectAll(); };
|
|
719
719
|
LibTableComponent.prototype.globalFilterCompleted = function () { this.changePage(1); };
|
|
720
720
|
LibTableComponent.prototype.changePage = function (requestedPage) { this.table.changePage(requestedPage); };
|
|
721
|
-
LibTableComponent.prototype.tableColumnSort = function (columnName) {
|
|
721
|
+
LibTableComponent.prototype.tableColumnSort = function (columnName, direction) {
|
|
722
|
+
if (direction === void 0) { direction = null; }
|
|
723
|
+
this.table.sort(columnName, direction !== null && direction !== void 0 ? direction : 'ascend');
|
|
724
|
+
};
|
|
722
725
|
LibTableComponent.prototype.globalFilterChanged = function () { var _a, _b; this.table.setGlobalFilterString((_b = (_a = this.globalFilterString) === null || _a === void 0 ? void 0 : _a.trim()) !== null && _b !== void 0 ? _b : ''); };
|
|
723
726
|
LibTableComponent.prototype.syncAttribute = function (name, value) {
|
|
724
727
|
try {
|
|
@@ -1899,8 +1902,8 @@
|
|
|
1899
1902
|
configurable: true
|
|
1900
1903
|
});
|
|
1901
1904
|
// Ordenamiento de registros local
|
|
1902
|
-
RecordTable.prototype.sort = function (columnName) {
|
|
1903
|
-
this.setRequiredOrder(columnName);
|
|
1905
|
+
RecordTable.prototype.sort = function (columnName, direction) {
|
|
1906
|
+
this.setRequiredOrder(columnName, direction);
|
|
1904
1907
|
if (this.clientPaging) {
|
|
1905
1908
|
this.localSortData();
|
|
1906
1909
|
}
|
|
@@ -1908,18 +1911,12 @@
|
|
|
1908
1911
|
this.notifyGetDataAction();
|
|
1909
1912
|
}
|
|
1910
1913
|
};
|
|
1911
|
-
RecordTable.prototype.setRequiredOrder = function (columnField) {
|
|
1912
|
-
if (
|
|
1913
|
-
|
|
1914
|
-
|
|
1915
|
-
|
|
1916
|
-
|
|
1917
|
-
}
|
|
1918
|
-
else {
|
|
1919
|
-
var tableSort = this.sorting;
|
|
1920
|
-
tableSort.direction = (tableSort.direction === TABLE_SORT_ASCENDING) ? TABLE_SORT_DESCENDING : TABLE_SORT_ASCENDING;
|
|
1921
|
-
this.setAttr('sorting', tableSort);
|
|
1922
|
-
}
|
|
1914
|
+
RecordTable.prototype.setRequiredOrder = function (columnField, direction) {
|
|
1915
|
+
if (direction === void 0) { direction = null; }
|
|
1916
|
+
this.setAttr('sorting', {
|
|
1917
|
+
columnName: columnField,
|
|
1918
|
+
direction: (direction === 'ascend') ? TABLE_SORT_ASCENDING : TABLE_SORT_DESCENDING,
|
|
1919
|
+
});
|
|
1923
1920
|
};
|
|
1924
1921
|
RecordTable.prototype.localSortData = function () {
|
|
1925
1922
|
var _this = this;
|