@xh/hoist 87.1.0 → 87.1.1

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 CHANGED
@@ -12,6 +12,13 @@
12
12
  3. Plain ASCII punctuation only. Use " - " for in-sentence breaks, never an em dash.
13
13
  -->
14
14
 
15
+ ## 87.1.1 - 2026-09-02
16
+
17
+ ### 🐞 Bug Fixes
18
+
19
+ * Fixed `GridModel.getSortedRecords()` throwing e.g. grid exports when grouped by a non-string
20
+ field. Group values are now coerced to string keys before sorting.
21
+
15
22
  ## 87.1.0 - 2026-08-28
16
23
 
17
24
  ### 🎁 New Features
@@ -105,15 +105,23 @@ function getGroupSorters(gridModel: GridModel): RecordSorter[] {
105
105
  const column = gridModel.getColumn(colId);
106
106
  if (!column) return null;
107
107
 
108
- const {field} = column;
108
+ const {field} = column,
109
+ {getValueFn, ctx} = sorterFor(gridModel, column);
109
110
  return {
110
- ...sorterFor(gridModel, column),
111
+ ctx,
112
+ // groupSortFn expects ag-Grid group keys - always string or null, never raw values.
113
+ getValueFn: params => toGroupKey(getValueFn(params)),
111
114
  compare: (a, b, nodeA, nodeB) => groupSortFn(a, b, field, {gridModel, nodeA, nodeB})
112
115
  };
113
116
  })
114
117
  );
115
118
  }
116
119
 
120
+ /** Mirror ag-Grid's ValueService.getKeyForNode - string/null pass through, else String(). */
121
+ function toGroupKey(value: any): string {
122
+ return value == null || typeof value === 'string' ? value : String(value);
123
+ }
124
+
117
125
  /** Value-resolution half of a sorter - the caller supplies the comparator. */
118
126
  function sorterFor(gridModel: GridModel, column: Column) {
119
127
  const {field, getValueFn} = column;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xh/hoist",
3
- "version": "87.1.0",
3
+ "version": "87.1.1",
4
4
  "description": "Hoist add-on for building and deploying React Applications.",
5
5
  "repository": {
6
6
  "type": "git",