@itrocks/table 0.4.1 → 0.4.2

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.
Files changed (2) hide show
  1. package/freeze.js +2 -1
  2. package/package.json +1 -1
package/freeze.js CHANGED
@@ -78,7 +78,8 @@ export class TableFreeze extends Plugin {
78
78
  const table = this.of;
79
79
  if (!table.element.tHead?.rows.length)
80
80
  return;
81
- let counter = 1, top = .0, previousTop = table.element.getBoundingClientRect().top;
81
+ // Header measurements are in scrolled coordinates after refresh removes the sticky rules.
82
+ let counter = 1, top = .0, previousTop = table.element.getBoundingClientRect().top - table.element.scrollTop;
82
83
  table.element.tHead.querySelectorAll(':scope > tr').forEach(row => {
83
84
  const actualTop = row.getBoundingClientRect().top;
84
85
  top += actualTop - previousTop;
package/package.json CHANGED
@@ -53,5 +53,5 @@
53
53
  "scripts": {
54
54
  "build": "tsc && sass --no-source-map demo:demo src/column-add.scss:column-add.css && node ../prepare-module/prepare-module.js"
55
55
  },
56
- "version": "0.4.1"
56
+ "version": "0.4.2"
57
57
  }