@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 +7 -0
- package/cmp/grid/Grid.js +3 -4
- package/cmp/grid/GridModel.js +2 -2
- package/package.json +1 -1
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.
|
|
656
|
-
|
|
657
|
-
|
|
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
|
}
|
package/cmp/grid/GridModel.js
CHANGED
|
@@ -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.
|
|
1081
|
+
colIds = this.columnState.map(it => it.colId);
|
|
1082
1082
|
} else {
|
|
1083
|
-
colIds = columns ?? this.
|
|
1083
|
+
colIds = columns ?? this.columnState.map(it => it.colId);
|
|
1084
1084
|
}
|
|
1085
1085
|
|
|
1086
1086
|
colIds = castArray(colIds).filter(id => {
|