@xh/hoist 46.1.1 → 46.1.2

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
@@ -1,5 +1,12 @@
1
1
  # Changelog
2
2
 
3
+ ## v46.1.2 - 2022-02-18
4
+
5
+ ### 🐞 Bug Fixes
6
+ * Fixed an issue where column autosize can reset column order under certain circumstances.
7
+
8
+ [Commit Log](https://github.com/xh/hoist-react/compare/v46.1.1...v46.1.2)
9
+
3
10
  ## v46.1.1 - 2022-02-15
4
11
 
5
12
  ### 🐞 Bug Fixes
package/cmp/grid/Grid.js CHANGED
@@ -652,10 +652,9 @@ class GridLocalModel extends HoistModel {
652
652
  model.autosizeAsync();
653
653
  } else {
654
654
  // ...otherwise, only autosize columns that are not manually sized
655
- const columns = model.getLeafColumnIds().filter(colId => {
656
- const state = model.findColumn(model.columnState, colId);
657
- return state && !state.manuallySized;
658
- });
655
+ const columns = model.columnState
656
+ .filter(it => !it.manuallySized)
657
+ .map(it => it.colId);
659
658
  model.autosizeAsync({columns});
660
659
  }
661
660
  }
@@ -1078,9 +1078,9 @@ export class GridModel extends HoistModel {
1078
1078
  let colIds, includeColFn = () => true;
1079
1079
  if (isFunction(columns)) {
1080
1080
  includeColFn = columns;
1081
- colIds = this.getLeafColumnIds();
1081
+ colIds = this.columnState.map(it => it.colId);
1082
1082
  } else {
1083
- colIds = columns ?? this.getLeafColumnIds();
1083
+ colIds = columns ?? this.columnState.map(it => it.colId);
1084
1084
  }
1085
1085
 
1086
1086
  colIds = castArray(colIds).filter(id => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xh/hoist",
3
- "version": "46.1.1",
3
+ "version": "46.1.2",
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",