@isoftdata/svelte-table 2.10.3 → 2.10.5

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/dist/Table.svelte CHANGED
@@ -1151,7 +1151,7 @@
1151
1151
 
1152
1152
  th.pinned {
1153
1153
  position: sticky;
1154
- z-index: 5 !important;
1154
+ z-index: 11 !important;
1155
1155
  left: var(--pinned-column-offset, -1);
1156
1156
  }
1157
1157
 
package/dist/Td.svelte CHANGED
@@ -165,7 +165,7 @@
165
165
 
166
166
  .pinned {
167
167
  position: sticky;
168
- z-index: 4 !important;
168
+ z-index: 10 !important;
169
169
  left: var(--pinned-column-offset, -1);
170
170
  }
171
171
  </style>
@@ -75,18 +75,25 @@ export class ColumnInfoRunicStore {
75
75
  // Such as when a new columns is pinned, or a pinned column is hidden/resized or otherwise modified
76
76
  const colIndex = this.pinnedColumns.findIndex(c => c.property === property);
77
77
  if (colIndex === -1) {
78
- console.warn(`Could not find columns ${property} in list of pinned columns: ${this.pinnedColumns.join(', ')}`);
78
+ console.warn(`Could not find columns "${property}" in list of pinned columns: ${this.pinnedColumns.join(', ')}`);
79
79
  return '0px';
80
80
  }
81
81
  else if (colIndex === 0) {
82
82
  return '-1px'; // Fix the gap on the left side of the first column
83
83
  }
84
84
  const offsetPx = this.pinnedColumns.slice(0, colIndex).reduce((acc, col) => {
85
- if (col.userWidth && col.visible) {
86
- acc += parseFloat(col.userWidth);
85
+ if (!col.visible) {
86
+ return acc;
87
+ }
88
+ const px = col.userWidth?.match(pixelRegex)?.[1] ?? null;
89
+ if (col.userWidth && px) {
90
+ acc += parseFloat(px);
87
91
  }
88
92
  else if (!col.userWidth) {
89
- console.warn(`Cannot make column ${property} pinned because it has no userWidth!`);
93
+ console.warn(`Cannot make column "${property}" pinned because it has no userWidth!`);
94
+ }
95
+ else if (!px) {
96
+ console.warn(`Cannot make column "${property}" pinned because its userWidth "${col.userWidth}" is not in pixels!`);
90
97
  }
91
98
  return acc;
92
99
  }, 0);
@@ -135,3 +142,4 @@ export class ColumnInfoRunicStore {
135
142
  return derivedValue;
136
143
  }
137
144
  }
145
+ const pixelRegex = /(\d+)px/;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@isoftdata/svelte-table",
3
- "version": "2.10.3",
3
+ "version": "2.10.5",
4
4
  "exports": {
5
5
  ".": {
6
6
  "types": "./dist/index.d.ts",