@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/llms.txt CHANGED
@@ -1,6 +1,6 @@
1
1
  # OpenGridX — AI Agent Context
2
2
  # Package: @opencorestack/opengridx
3
- # Version: 3.0.1
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.1",
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",