jquery.dgtable 0.5.51 → 0.5.52
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/README.md +1 -1
- package/dist/jquery.dgtable.cjs.js +6 -6
- package/dist/jquery.dgtable.cjs.js.map +1 -1
- package/dist/jquery.dgtable.cjs.min.js +2 -2
- package/dist/jquery.dgtable.cjs.min.js.map +1 -1
- package/dist/jquery.dgtable.es6.js +6 -6
- package/dist/jquery.dgtable.es6.js.map +1 -1
- package/dist/jquery.dgtable.es6.min.js +2 -2
- package/dist/jquery.dgtable.es6.min.js.map +1 -1
- package/dist/jquery.dgtable.umd.js +6 -6
- package/dist/jquery.dgtable.umd.js.map +1 -1
- package/dist/jquery.dgtable.umd.min.js +2 -2
- package/dist/jquery.dgtable.umd.min.js.map +1 -1
- package/package.json +1 -1
- package/src/index.js +4 -4
- package/src/row_collection.js +1 -1
package/README.md
CHANGED
|
@@ -92,7 +92,7 @@ To create a new table, just use `var myTable = new DGTable(INIT_OPTIONS)`.
|
|
|
92
92
|
* **rowsBufferSize**: `Number=10` The size of the rows buffer, for virtual table
|
|
93
93
|
* **minColumnWidth**: `Number=35` In pixels, the minimum width for a column
|
|
94
94
|
* **resizeAreaWidth**: `Number=8` The size of the area where you can drag to resize.
|
|
95
|
-
* **onComparatorRequired**: `function(columnName: string, descending: boolean, defaultComparator: function(a,b):
|
|
95
|
+
* **onComparatorRequired**: `function(columnName: string, descending: boolean, defaultComparator: function(a,b):number):{function(a,b):number}` A callback that can pass a comparator function for each column and mode as required.
|
|
96
96
|
* **resizerClassName**: `String='dgtable-resize'` Class name for the dragged resizing element (showing when resizing a column)
|
|
97
97
|
* **tableClassName**: `String='dgtable'` Class name for the table
|
|
98
98
|
* **allowCellPreview**: `Boolean=true` When set, hovering on truncated cells will show a preview of the full content.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* jquery.dgtable 0.5.
|
|
2
|
+
* jquery.dgtable 0.5.52
|
|
3
3
|
* git://github.com/danielgindi/jquery.dgtable.git
|
|
4
4
|
*/
|
|
5
5
|
'use strict';
|
|
@@ -1307,7 +1307,7 @@ RowCollection.prototype.filteredCollection = function (filterFunc, args) {
|
|
|
1307
1307
|
};
|
|
1308
1308
|
|
|
1309
1309
|
/**
|
|
1310
|
-
* @type {function(columnName: string, descending: boolean, defaultComparator: function(a,b):
|
|
1310
|
+
* @type {function(columnName: string, descending: boolean, defaultComparator: function(a,b):number)|null|undefined}
|
|
1311
1311
|
*/
|
|
1312
1312
|
RowCollection.prototype.onComparatorRequired = null;
|
|
1313
1313
|
|
|
@@ -1853,7 +1853,7 @@ DGTable.prototype.initialize = function (options) {
|
|
|
1853
1853
|
|
|
1854
1854
|
/**
|
|
1855
1855
|
* @private
|
|
1856
|
-
* @field {function(columnName: string, descending: boolean, defaultComparator: function(a,b):
|
|
1856
|
+
* @field {function(columnName: string, descending: boolean, defaultComparator: function(a,b):number):(function(a,b):number)} onComparatorRequired */
|
|
1857
1857
|
o.onComparatorRequired = options.onComparatorRequired === undefined ? null : options.onComparatorRequired;
|
|
1858
1858
|
if (!o.onComparatorRequired && typeof options['comparatorCallback'] === 'function') {
|
|
1859
1859
|
o.onComparatorRequired = options['comparatorCallback'];
|
|
@@ -1918,9 +1918,9 @@ DGTable.prototype.initialize = function (options) {
|
|
|
1918
1918
|
|
|
1919
1919
|
/** @field {RowCollection} _rows */
|
|
1920
1920
|
p.rows = new RowCollection({ sortColumn: sortColumns });
|
|
1921
|
-
p.rows.onComparatorRequired =
|
|
1921
|
+
p.rows.onComparatorRequired = (column, descending, defaultComparator) => {
|
|
1922
1922
|
if (o.onComparatorRequired) {
|
|
1923
|
-
return o.onComparatorRequired(column, descending);
|
|
1923
|
+
return o.onComparatorRequired(column, descending, defaultComparator);
|
|
1924
1924
|
}
|
|
1925
1925
|
};
|
|
1926
1926
|
|
|
@@ -3270,7 +3270,7 @@ DGTable.prototype.getResizableColumns = function () {
|
|
|
3270
3270
|
/**
|
|
3271
3271
|
* @public
|
|
3272
3272
|
* @expose
|
|
3273
|
-
* @param {{function(columnName: string, descending: boolean, defaultComparator: function(a,b):
|
|
3273
|
+
* @param {{function(columnName: string, descending: boolean, defaultComparator: function(a,b):number):{function(a,b):number}}} comparatorCallback a callback function that returns the comparator for a specific column
|
|
3274
3274
|
* @returns {DGTable} self
|
|
3275
3275
|
*/
|
|
3276
3276
|
DGTable.prototype.setComparatorCallback = function (comparatorCallback) {
|