canvas-datagrid 0.3.15 → 0.3.16
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/CHANGELOG.md +7 -1
- package/dist/canvas-datagrid.debug.js +6 -11
- package/dist/canvas-datagrid.debug.map +1 -1
- package/dist/canvas-datagrid.js +1 -1
- package/dist/canvas-datagrid.module.js +1 -1
- package/dist/canvas-datagrid.module.js.map +1 -1
- package/lib/publicMethods.js +6 -10
- package/package.json +1 -1
package/lib/publicMethods.js
CHANGED
|
@@ -1367,22 +1367,18 @@ export default function (self) {
|
|
|
1367
1367
|
self.sorters.string = function (columnName, direction) {
|
|
1368
1368
|
var asc = direction === 'asc';
|
|
1369
1369
|
return function (a, b) {
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
}
|
|
1373
|
-
if (b[columnName] === undefined || b[columnName] === null) {
|
|
1374
|
-
return 0;
|
|
1375
|
-
}
|
|
1370
|
+
const aValue = a[columnName] || '';
|
|
1371
|
+
const bValue = b[columnName] || '';
|
|
1376
1372
|
if (asc) {
|
|
1377
|
-
if (!
|
|
1373
|
+
if (!aValue.localeCompare) {
|
|
1378
1374
|
return 1;
|
|
1379
1375
|
}
|
|
1380
|
-
return
|
|
1376
|
+
return aValue.localeCompare(bValue);
|
|
1381
1377
|
}
|
|
1382
|
-
if (!
|
|
1378
|
+
if (!bValue.localeCompare) {
|
|
1383
1379
|
return 1;
|
|
1384
1380
|
}
|
|
1385
|
-
return
|
|
1381
|
+
return bValue.localeCompare(aValue);
|
|
1386
1382
|
};
|
|
1387
1383
|
};
|
|
1388
1384
|
self.sorters.number = function (columnName, direction) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "canvas-datagrid",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.16",
|
|
4
4
|
"description": "Canvas based data grid web component. Capable of displaying millions of contiguous hierarchical rows and columns without paging or loading, on a single canvas element.",
|
|
5
5
|
"main": "./dist/canvas-datagrid.js",
|
|
6
6
|
"module": "./dist/canvas-datagrid.module.js",
|