@opencorestack/opengridx 3.0.1 → 3.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/CHANGELOG.md +14 -0
- package/README.md +3 -1
- package/dist/index.d.ts +33 -0
- package/dist/opengridx.es.js +3944 -3851
- package/dist/opengridx.es.js.map +1 -1
- package/dist/opengridx.umd.js +14 -14
- package/dist/opengridx.umd.js.map +1 -1
- package/docs/API_REFERENCE.md +4 -1
- package/docs/architecture/datagrid-orchestration.md +1 -0
- package/docs/components/column-resize.md +13 -1
- package/docs/features/sorting-pagination.md +26 -0
- package/docs/migration/v2-to-v3.md +1 -1
- package/lib/components/ColumnResizeHandle/ColumnResizeHandle.tsx +12 -3
- package/lib/components/DataGrid/DataGrid.tsx +3 -0
- package/lib/components/Header/Header.tsx +4 -0
- package/lib/hooks/core/gridApiPlaceholder.ts +2 -0
- package/lib/hooks/core/useGridColumnAutosize.ts +52 -0
- package/lib/hooks/core/useGridRowPipeline.ts +2 -2
- package/lib/hooks/useRowGrouping.ts +20 -3
- package/lib/hooks/useTreeData.ts +8 -1
- package/lib/index.ts +1 -0
- package/lib/types/index.ts +32 -0
- package/lib/utils/columnAutosize.ts +56 -0
- package/lib/utils/pivot/index.ts +11 -2
- package/lib/utils/sorting/index.ts +77 -24
- package/llms.txt +7 -2
- package/package.json +1 -1
package/llms.txt
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# OpenGridX — AI Agent Context
|
|
2
2
|
# Package: @opencorestack/opengridx
|
|
3
|
-
# Version: 3.0
|
|
3
|
+
# Version: 3.1.0
|
|
4
4
|
# Docs: https://opencorestack.github.io/OpenGridX/
|
|
5
5
|
# This file is machine-readable. AI developers: start here.
|
|
6
6
|
|
|
@@ -248,8 +248,9 @@ There are no getRowClassName / getCellClassName / theme props: use GridColDef.ce
|
|
|
248
248
|
| align | 'left'/'center'/'right' | Cell content alignment |
|
|
249
249
|
| headerAlign | 'left'/'center'/'right' | Header content alignment |
|
|
250
250
|
| sortable | boolean (default true) | Enable sorting |
|
|
251
|
+
| sortComparator | (v1, v2, params1, params2) => number | Custom ascending comparator (3.1.0+). v1/v2 are valueGetter values incl. null/undefined; params { id, field, row, value }. Negated for desc; multi-sort tie-break chain; groups by grouping value; tree siblings; pivot row labels. Throw/NaN = 0. Ignored in server sortingMode |
|
|
251
252
|
| filterable | boolean (default true) | Enable filtering and quick search |
|
|
252
|
-
| resizable | boolean (default true) | Enable resize handle (mouse, touch, Alt+Arrow on header) |
|
|
253
|
+
| resizable | boolean (default true) | Enable resize handle (mouse, touch, Alt+Arrow on header); double-click or Enter on the handle auto-sizes to content (3.1.0+) |
|
|
253
254
|
| hideable | boolean (default true) | Allow hiding via toolbar / column menu |
|
|
254
255
|
| pinnable | boolean (default true) | Allow pinning via column menu (does not affect drag-reorder) |
|
|
255
256
|
| exportable | boolean (default true) | Include in CSV/Excel/JSON/Print/PDF exports and clipboard copy |
|
|
@@ -298,6 +299,10 @@ apiRef.current.setPageSize(size)
|
|
|
298
299
|
// Scroll
|
|
299
300
|
apiRef.current.scrollToIndexes({ rowIndex, colIndex })
|
|
300
301
|
|
|
302
|
+
// Auto-size to header + rendered cells, clamped to minWidth/maxWidth (3.1.0+)
|
|
303
|
+
apiRef.current.autosizeColumn(field)
|
|
304
|
+
apiRef.current.autosizeColumns(fields?)
|
|
305
|
+
|
|
301
306
|
// Clipboard
|
|
302
307
|
apiRef.current.copySelectedRows() // → Promise<void>; rejects if the write fails. Copies every selected row that passes
|
|
303
308
|
// the filter (all pages, collapsed groups, pinned rows), visible columns in screen order
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opencorestack/opengridx",
|
|
3
|
-
"version": "3.0
|
|
3
|
+
"version": "3.1.0",
|
|
4
4
|
"description": "OpenGridX: High-performance React data infrastructure. Unlock advanced Row Grouping, Excel Export, and Column Pinning without the usual \"Pro\" gatekeeping. Built for speed, scale, and complete architectural freedom. Fully open, virtualization-ready, and feature-complete.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/opengridx.umd.js",
|