@xh/hoist 78.0.0-SNAPSHOT.1763568169798 → 78.0.0-SNAPSHOT.1763606305479

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
@@ -6,6 +6,11 @@
6
6
 
7
7
  * `FieldFilter` implementation expanded to support `not begins` and `not ends` operators.
8
8
 
9
+ ### 🐞 Bug Fixes
10
+
11
+ * Fixed `GridModel` not appending children to the parents correctly when loaded data uses a
12
+ numerical ID.
13
+
9
14
  ### ⚙️ Technical
10
15
 
11
16
  * `FetchService` will recognize variants on the `application/json` content-type when processing
@@ -122,8 +122,9 @@ export declare class AgGridModel extends HoistModel {
122
122
  applySortBy(value: Some<GridSorterLike>): void;
123
123
  /**
124
124
  * @returns the current row expansion state of the grid in a serializable form.
125
- * Returned object has keys for StoreRecordIds of top-level, expanded records and values
126
- * of either `true` or an object with keys of StoreRecordIds of expanded child records.
125
+ * Returned object has keys for (stringified!) StoreRecordIds of all top-level
126
+ * expanded rows and values of either `true` (if the row does not have any children, or
127
+ * none are expanded) or a recursive object of the same shape (if children are expanded).
127
128
  */
128
129
  getExpandState(): PlainObject;
129
130
  /**
@@ -408,8 +408,9 @@ export class AgGridModel extends HoistModel {
408
408
 
409
409
  /**
410
410
  * @returns the current row expansion state of the grid in a serializable form.
411
- * Returned object has keys for StoreRecordIds of top-level, expanded records and values
412
- * of either `true` or an object with keys of StoreRecordIds of expanded child records.
411
+ * Returned object has keys for (stringified!) StoreRecordIds of all top-level
412
+ * expanded rows and values of either `true` (if the row does not have any children, or
413
+ * none are expanded) or a recursive object of the same shape (if children are expanded).
413
414
  */
414
415
  getExpandState(): PlainObject {
415
416
  this.throwIfNotReady();
@@ -230,7 +230,12 @@ export class StoreRecord {
230
230
  this.raw = raw;
231
231
  this.committedData = committedData;
232
232
  this.parentId = parent?.id;
233
- this.treePath = parent ? [...parent.treePath, id] : [id];
233
+ /*
234
+ * See https://www.ag-grid.com/javascript-data-grid/tree-data-paths/
235
+ * Each row's position in the hierarchy must be provided to the grid as an array of strings,
236
+ * representing the path to the row.
237
+ */
238
+ this.treePath = parent ? [...parent.treePath, id.toString()] : [id.toString()];
234
239
  this.isSummary = isSummary;
235
240
  }
236
241
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xh/hoist",
3
- "version": "78.0.0-SNAPSHOT.1763568169798",
3
+ "version": "78.0.0-SNAPSHOT.1763606305479",
4
4
  "description": "Hoist add-on for building and deploying React Applications.",
5
5
  "repository": "github:xh/hoist-react",
6
6
  "homepage": "https://xh.io",