canvas-datagrid 0.3.15 → 0.3.17
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 +13 -1
- package/dist/canvas-datagrid.debug.js +12 -13
- 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/draw.js +8 -2
- package/lib/publicMethods.js +6 -10
- package/package.json +1 -1
package/lib/draw.js
CHANGED
|
@@ -1102,11 +1102,17 @@ export default function (self) {
|
|
|
1102
1102
|
|
|
1103
1103
|
// Gaps may occur in row numbers between consecutively rendered rows
|
|
1104
1104
|
// when we are filtering. We draw attention to this by drawing a thick
|
|
1105
|
-
// border overlapping the two consecutive row headers.
|
|
1105
|
+
// border overlapping the two consecutive row headers. If sorting, visible
|
|
1106
|
+
// row numbers stay the same (i.e. they don't correspond to the underlying
|
|
1107
|
+
// data's row number), so we do not show row gaps in that case.
|
|
1108
|
+
const isSorting =
|
|
1109
|
+
self.orderings.columns && self.orderings.columns.length > 0;
|
|
1110
|
+
|
|
1106
1111
|
if (
|
|
1107
1112
|
isRowHeader &&
|
|
1108
1113
|
self.attributes.showRowNumbers &&
|
|
1109
|
-
self.attributes.showRowNumberGaps
|
|
1114
|
+
self.attributes.showRowNumberGaps &&
|
|
1115
|
+
isSorting === false
|
|
1110
1116
|
) {
|
|
1111
1117
|
const previousRowNumber = self.getBoundRowIndexFromViewRowIndex(
|
|
1112
1118
|
rowOrderIndex - 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.17",
|
|
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",
|