@xh/hoist 75.0.0-SNAPSHOT.1754604038542 → 75.0.0-SNAPSHOT.1754662698635
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.
|
@@ -397,7 +397,7 @@ export declare class GridModel extends HoistModel {
|
|
|
397
397
|
*
|
|
398
398
|
* Note that this getter will *not* change if just the data of selected record is changed
|
|
399
399
|
* due to store loading or editing. Applications also interested in the contents of the
|
|
400
|
-
*
|
|
400
|
+
* selection should use the {@link selectedRecord} getter instead.
|
|
401
401
|
*/
|
|
402
402
|
get selectedId(): StoreRecordId;
|
|
403
403
|
/** True if this grid has no records to show in its store. */
|
package/cmp/grid/GridModel.ts
CHANGED
|
@@ -898,7 +898,7 @@ export class GridModel extends HoistModel {
|
|
|
898
898
|
*
|
|
899
899
|
* Note that this getter will *not* change if just the data of selected record is changed
|
|
900
900
|
* due to store loading or editing. Applications also interested in the contents of the
|
|
901
|
-
*
|
|
901
|
+
* selection should use the {@link selectedRecord} getter instead.
|
|
902
902
|
*/
|
|
903
903
|
get selectedId(): StoreRecordId {
|
|
904
904
|
return this.selModel.selectedId;
|
|
@@ -1038,25 +1038,24 @@ export class GridModel extends HoistModel {
|
|
|
1038
1038
|
this.expandLevel = level;
|
|
1039
1039
|
|
|
1040
1040
|
// 0) Not rendered, we are done.
|
|
1041
|
-
const {agApi} = this;
|
|
1041
|
+
const {agApi, store} = this;
|
|
1042
1042
|
if (!agApi) return;
|
|
1043
1043
|
|
|
1044
1044
|
// 1) Update rendered grid.
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
// mysteriously (but efficiently) changes the currently rendered rows as well.
|
|
1048
|
-
agApi.setGridOption('groupDefaultExpanded', level);
|
|
1049
|
-
} else if (level == 0 || level >= this.maxDepth) {
|
|
1050
|
-
// otherwise api methods available.
|
|
1045
|
+
agApi.setGridOption('groupDefaultExpanded', level);
|
|
1046
|
+
if (level == 0 || level >= this.maxDepth) {
|
|
1051
1047
|
level == 0 ? agApi.collapseAll() : agApi.expandAll();
|
|
1052
1048
|
} else {
|
|
1053
|
-
//
|
|
1054
|
-
//
|
|
1055
|
-
|
|
1056
|
-
|
|
1049
|
+
// Update raw nodes for efficiency
|
|
1050
|
+
// This approach documented in agGrids onGroupExpandedOrCollapsed() docs (2025)
|
|
1051
|
+
store.records.forEach(rec => {
|
|
1052
|
+
const node = agApi.getRowNode(rec.agId);
|
|
1053
|
+
if (node) {
|
|
1054
|
+
node.expanded = rec.depth < level;
|
|
1055
|
+
}
|
|
1056
|
+
});
|
|
1057
|
+
agApi.onGroupExpandedOrCollapsed();
|
|
1057
1058
|
}
|
|
1058
|
-
|
|
1059
|
-
// 2) Finally, be sure to update our state snapshot.
|
|
1060
1059
|
this.noteAgExpandStateChange();
|
|
1061
1060
|
}
|
|
1062
1061
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xh/hoist",
|
|
3
|
-
"version": "75.0.0-SNAPSHOT.
|
|
3
|
+
"version": "75.0.0-SNAPSHOT.1754662698635",
|
|
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",
|