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 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):boolean):{function(a,b):boolean}` A callback that can pass a comparator function for each column and mode as required.
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.51
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):boolean)|null|undefined}
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):boolean):(function(a,b):boolean)} onComparatorRequired */
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 = function (column, descending) {
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):boolean):{function(a,b):boolean}}} comparatorCallback a callback function that returns the comparator for a specific column
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) {