@worknice/whiteboard 0.12.4 → 0.12.6
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/presentation/Table.js +11 -3
- package/package.json +2 -2
|
@@ -164,6 +164,16 @@ const Table = ({ data, columns, bulkActions = [], secondaryBulkActions = [], csv
|
|
|
164
164
|
initialRect: {
|
|
165
165
|
height: 1080,
|
|
166
166
|
width: 1920
|
|
167
|
+
},
|
|
168
|
+
getItemKey: (index)=>{
|
|
169
|
+
const row = rows[index];
|
|
170
|
+
return `${row.id}-${table.getState().grouping.join(",")}`;
|
|
171
|
+
},
|
|
172
|
+
measureElement: (element, _, instance)=>{
|
|
173
|
+
const rect = element.getBoundingClientRect();
|
|
174
|
+
if (rect.height > 0 && rect.width > 0) return Math.round(rect.height);
|
|
175
|
+
const cachedSize = instance.measurementsCache[instance.indexFromElement(element)].size;
|
|
176
|
+
return cachedSize;
|
|
167
177
|
}
|
|
168
178
|
});
|
|
169
179
|
const createCsvDataUrl = (columns, rows)=>{
|
|
@@ -414,9 +424,7 @@ const Table = ({ data, columns, bulkActions = [], secondaryBulkActions = [], csv
|
|
|
414
424
|
enableRowSelection ? __WEBPACK_EXTERNAL_MODULE__Table_module_js_1c0e33be__["default"].selectableRows : ""
|
|
415
425
|
]),
|
|
416
426
|
"data-index": virtualRow.index,
|
|
417
|
-
ref:
|
|
418
|
-
rowVirtualizer.measureElement(node);
|
|
419
|
-
},
|
|
427
|
+
ref: rowVirtualizer.measureElement,
|
|
420
428
|
style: {
|
|
421
429
|
position: "absolute",
|
|
422
430
|
transform: `translateY(${virtualRow.start - rowVirtualizer.options.scrollMargin}px)`
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@worknice/whiteboard",
|
|
3
3
|
"description": "",
|
|
4
|
-
"version": "0.12.
|
|
4
|
+
"version": "0.12.6",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"private": false,
|
|
7
7
|
"files": [
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"react-markdown": "^10.1.0",
|
|
39
39
|
"utf8": "^3.0.0",
|
|
40
40
|
"zod": "^3.22.3",
|
|
41
|
-
"@worknice/utils": "^0.6.
|
|
41
|
+
"@worknice/utils": "^0.6.29"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
44
|
"@anolilab/semantic-release-pnpm": "^1.1.10",
|