jquery.dgtable 0.6.2 → 0.6.4

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "jquery.dgtable",
3
3
  "description": "High-performance table View for jQuery",
4
- "version": "0.6.2",
4
+ "version": "0.6.4",
5
5
  "main": "dist/jquery.dgtable.cjs.min.js",
6
6
  "module": "dist/jquery.dgtable.es6.min.js",
7
7
  "broswer": "dist/jquery.dgtable.umd.min.js",
@@ -18,11 +18,11 @@
18
18
  },
19
19
  "scripts": {
20
20
  "build": "npm run lint && node ./scripts/build.js",
21
- "lint": "eslint -f codeframe ./",
22
- "lint-fix": "eslint -f codeframe --fix ./",
23
- "_postinstall": "husky install",
24
- "prepublishOnly": "pinst --disable && npm run build",
25
- "postpublish": "pinst --enable"
21
+ "lint": "node -e \"process.env.NODE_ENV != 'production' && process.exit(1)\" || eslint -f codeframe ./",
22
+ "lint-fix": "node -e \"process.env.NODE_ENV != 'production' && process.exit(1)\" || eslint -f codeframe --fix ./",
23
+ "_postinstall": "node -e \"process.env.NODE_ENV != 'production' && process.exit(1)\" || husky install",
24
+ "prepublishOnly": "node -e \"process.env.NODE_ENV != 'production' && process.exit(1)\" || pinst --disable && npm run build",
25
+ "postpublish": "node -e \"process.env.NODE_ENV != 'production' && process.exit(1)\" || pinst --enable"
26
26
  },
27
27
  "bugs": {
28
28
  "url": "https://github.com/danielgindi/jquery.dgtable/issues"
@@ -35,7 +35,7 @@
35
35
  ],
36
36
  "dependencies": {
37
37
  "@danielgindi/dom-utils": "^1.0.8",
38
- "@danielgindi/virtual-list-helper": "^1.0.6"
38
+ "@danielgindi/virtual-list-helper": "^1.0.7"
39
39
  },
40
40
  "devDependencies": {
41
41
  "@babel/core": "^7.20.2",
package/src/index.js CHANGED
@@ -405,7 +405,7 @@ DGTable.prototype._setupVirtualTable = function () {
405
405
  list: p.table,
406
406
  itemsParent: p.tbody,
407
407
  autoVirtualWrapperWidth: false,
408
- virtual: true,
408
+ virtual: o.virtualTable,
409
409
  buffer: o.rowsBufferSize,
410
410
  estimatedItemHeight: o.estimatedRowHeight ? o.estimatedRowHeight : (p.virtualRowHeight || 40),
411
411
  itemElementCreatorFn: () => {
@@ -462,7 +462,7 @@ DGTable.prototype._setupVirtualTable = function () {
462
462
  },
463
463
  });
464
464
 
465
- p.virtualListHelper.setCount(p.rows.length);
465
+ p.virtualListHelper.setCount((p.filteredRows ?? p.rows).length);
466
466
 
467
467
  p.notifyRendererOfColumnsConfig();
468
468
  };
@@ -767,7 +767,7 @@ DGTable.prototype.render = function () {
767
767
  .tableWidthChanged(true, false) // Take this chance to calculate required column widths
768
768
  ._renderSkeletonHeaderCells();
769
769
 
770
- p.virtualListHelper.invalidate();
770
+ p.virtualListHelper.setCount((p.filteredRows ?? p.rows).length);
771
771
 
772
772
  this._updateLastCellWidthFromScrollbar(true);
773
773