schummar-table 1.0.4 → 1.1.0
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/README.md +4 -2
- package/dist/index.cjs +220 -14
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +220 -14
- package/dist/index.js.map +1 -1
- package/dist/mantineTheme.cjs +1 -1
- package/dist/mantineTheme.d.cts +1 -1
- package/dist/mantineTheme.d.ts +1 -1
- package/dist/mantineTheme.js +1 -1
- package/dist/mui4Theme.d.cts +1 -1
- package/dist/mui4Theme.d.ts +1 -1
- package/dist/mui5Theme.d.cts +1 -1
- package/dist/mui5Theme.d.ts +1 -1
- package/dist/{types-Dlq59yQq.d.ts → types-13m4fK5g.d.ts} +24 -2
- package/dist/{types-CWF6E2Xg.d.cts → types-DCfeZ6qS.d.cts} +24 -2
- package/dist/{useTheme-B2ejsCOL.js → useTheme-C4YfOu-U.js} +10 -3
- package/dist/{useTheme-B2ejsCOL.js.map → useTheme-C4YfOu-U.js.map} +1 -1
- package/dist/{useTheme-BrKiZfIC.cjs → useTheme-DLbyOgz7.cjs} +10 -3
- package/dist/{useTheme-BrKiZfIC.cjs.map → useTheme-DLbyOgz7.cjs.map} +1 -1
- package/package.json +1 -1
- package/skills/schummar-table-upgrade/SKILL.md +7 -7
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: schummar-table-upgrade
|
|
3
|
-
description: Use when upgrading the schummar-table dependency from the 0.51.x line to a newer major version, or when the consumer's code hits errors/types referencing FunctionWithDeps, MemoizedTableTheme, subgrid,
|
|
3
|
+
description: Use when upgrading the schummar-table dependency from the 0.51.x line to a newer major version, or when the consumer's code hits errors/types referencing FunctionWithDeps, MemoizedTableTheme, subgrid, configureTableTheme, initalRowHeight, throttleScroll, overscanTop, overscanBottom, useTableContext returning a store/getState()-only shape, table.useState, table.update, or TableResetContext.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# schummar-table upgrade (0.51.x -> current)
|
|
@@ -56,13 +56,13 @@ Just drop the wrapping array and the deps array — keep the function that was i
|
|
|
56
56
|
|
|
57
57
|
`FunctionWithDeps` and `MemoizedTableTheme` types are gone — remove any imports/usages of them (needs human review if the consumer built their own helpers around these types).
|
|
58
58
|
|
|
59
|
-
## 3. Column reorder
|
|
59
|
+
## 3. Column reorder
|
|
60
60
|
|
|
61
61
|
Grep: `grep -rn 'enableColumnReorder\|columnOrder' src/`
|
|
62
62
|
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
63
|
+
`enableColumnReorder` and the `'columnOrder'` persist key work as before; nothing to change. Column
|
|
64
|
+
order can now also be set with `defaultColumnOrder`, `columnOrder` and `onColumnOrderChange`, and
|
|
65
|
+
reordered from the column selection menu.
|
|
66
66
|
|
|
67
67
|
## 4. `subgrid` prop removed (always-on CSS subgrid)
|
|
68
68
|
|
|
@@ -147,10 +147,10 @@ After:
|
|
|
147
147
|
|
|
148
148
|
Grep: `grep -rn 'useTableContext\|\.useState(\|\.getState(\|\.update(\|TableResetContext' src/`
|
|
149
149
|
|
|
150
|
-
`useTableContext()` no longer returns a store. It returns a plain object (type `TableContextValue`) with fields — `props`, `displaySize`, `sort`, `selection`, `expanded`, `hiddenColumns`, `columnWidths`, `filters`, `filterValues`, `columns`, `activeColumns`, `visibleColumns`, `items`, `itemsById`, `activeItems`, `activeItemsById` — plus `actions`.
|
|
150
|
+
`useTableContext()` no longer returns a store. It returns a plain object (type `TableContextValue`) with fields — `props`, `displaySize`, `sort`, `selection`, `expanded`, `hiddenColumns`, `columnOrder`, `columnWidths`, `filters`, `filterValues`, `columns`, `activeColumns`, `visibleColumns`, `items`, `itemsById`, `activeItems`, `activeItemsById` — plus `actions`.
|
|
151
151
|
|
|
152
152
|
- `table.useState(selector)` → destructure the field directly from `useTableContext()`.
|
|
153
|
-
- `table.update(...)` → call the matching method on `actions`: `actions.setSort`, `actions.setSelection`, `actions.toggleSelection`, `actions.setExpanded`, `actions.toggleExpanded`, `actions.setHiddenColumns`, `actions.setColumnWidth`, `actions.setFilterValue`, `actions.clearFilters`, `actions.resetTable`.
|
|
153
|
+
- `table.update(...)` → call the matching method on `actions`: `actions.setSort`, `actions.setSelection`, `actions.toggleSelection`, `actions.setExpanded`, `actions.toggleExpanded`, `actions.setHiddenColumns`, `actions.setColumnOrder`, `actions.moveColumn`, `actions.setColumnWidth`, `actions.setFilterValue`, `actions.clearFilters`, `actions.resetTable`.
|
|
154
154
|
- `table.getState()` → `actions.getState()` (for reading latest state inside event handlers, where a plain destructure from render would be stale).
|
|
155
155
|
- `TableResetContext` → `actions.resetTable()`.
|
|
156
156
|
- New `useTableActions()` hook returns just the stable `actions` object, useful when a component only needs to dispatch and shouldn't re-render on every state change.
|