@worknice/whiteboard 0.2.4 → 0.2.5-rc.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.
- package/dist/presentation/Table.js +12 -7
- package/package.json +2 -2
|
@@ -143,15 +143,20 @@ const Table = ({ data, columns, bulkActions = [], secondaryBulkActions = [], csv
|
|
|
143
143
|
const tableState = table.getState();
|
|
144
144
|
const tBodyRef = (0, __WEBPACK_EXTERNAL_MODULE_react__.useRef)(null);
|
|
145
145
|
const rows = table.getRowModel().rows;
|
|
146
|
+
const estimateSize = (0, __WEBPACK_EXTERNAL_MODULE_react__.useCallback)((index)=>{
|
|
147
|
+
if (!rows[index].getIsGrouped()) return estimatedRowSize;
|
|
148
|
+
{
|
|
149
|
+
const groupColumn = groupableColumns.find((column)=>column.id === rows[index].groupingColumnId);
|
|
150
|
+
return groupColumn?.grouping.size ?? estimatedRowSize;
|
|
151
|
+
}
|
|
152
|
+
}, [
|
|
153
|
+
estimatedRowSize,
|
|
154
|
+
groupableColumns,
|
|
155
|
+
rows
|
|
156
|
+
]);
|
|
146
157
|
const rowVirtualizer = (0, __WEBPACK_EXTERNAL_MODULE__tanstack_react_virtual_e7b31bc6__.useWindowVirtualizer)({
|
|
147
158
|
count: rows.length,
|
|
148
|
-
estimateSize
|
|
149
|
-
if (!rows[index].getIsGrouped()) return estimatedRowSize;
|
|
150
|
-
{
|
|
151
|
-
const groupColumn = groupableColumns.find((column)=>column.id === rows[index].groupingColumnId);
|
|
152
|
-
return groupColumn?.grouping.size ?? estimatedRowSize;
|
|
153
|
-
}
|
|
154
|
-
},
|
|
159
|
+
estimateSize,
|
|
155
160
|
overscan: 10,
|
|
156
161
|
scrollMargin: tBodyRef.current?.offsetTop ?? 0,
|
|
157
162
|
initialRect: {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@worknice/whiteboard",
|
|
3
3
|
"description": "",
|
|
4
|
-
"version": "0.2.
|
|
4
|
+
"version": "0.2.5-rc.2",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"private": false,
|
|
7
7
|
"files": [
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"js-search": "^2.0.0",
|
|
38
38
|
"utf8": "^3.0.0",
|
|
39
39
|
"zod": "^3.22.3",
|
|
40
|
-
"@worknice/utils": "^0.3.3"
|
|
40
|
+
"@worknice/utils": "^0.3.4-rc.3"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
43
|
"@anolilab/semantic-release-pnpm": "^1.1.10",
|