@kdcloudjs/table 1.2.2-canary.8 → 1.2.2-canary.9

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.
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  *
3
- * @kdcloudjs/table v1.2.2-canary.7
3
+ * @kdcloudjs/table v1.2.2-canary.8
4
4
  *
5
5
  * Copyright 2020-present, Kingdee, Inc.
6
6
  * All rights reserved.
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  *
3
- * @kdcloudjs/table v1.2.2-canary.7
3
+ * @kdcloudjs/table v1.2.2-canary.8
4
4
  *
5
5
  * Copyright 2020-present, Kingdee, Inc.
6
6
  * All rights reserved.
@@ -10482,6 +10482,7 @@ function treeMode() {
10482
10482
  var ctx = pipeline.ctx;
10483
10483
  var primaryKey = pipeline.ensurePrimaryKey('treeMode');
10484
10484
  var openKeys = (_ref = (_ref2 = (_opts$openKeys = opts.openKeys) !== null && _opts$openKeys !== void 0 ? _opts$openKeys : pipeline.getStateAtKey(stateKey)) !== null && _ref2 !== void 0 ? _ref2 : opts.defaultOpenKeys) !== null && _ref !== void 0 ? _ref : [];
10485
+ var curSort = pipeline.getStateAtKey('sort');
10485
10486
  var openKeySet = new Set(openKeys);
10486
10487
  var onChangeOpenKeys = function onChangeOpenKeys(nextKeys, key, action) {
10487
10488
  var _opts$onChangeOpenKey;
@@ -10532,10 +10533,11 @@ function treeMode() {
10532
10533
  var Icon = opts.icon;
10533
10534
  return pipeline.mapDataSource(processDataSource).mapColumns(processColumns);
10534
10535
  function processDataSource(input) {
10535
- if (pipeline.isSameInputDataSource() && openKeys === pipeline.getFeatureOptions('lastOpenKeys')) {
10536
+ if (pipeline.isSameInputDataSource() && openKeys === pipeline.getFeatureOptions('lastOpenKeys') && curSort === pipeline.getFeatureOptions('lastSort')) {
10536
10537
  return pipeline.getFeatureOptions('lastTreeMode');
10537
10538
  }
10538
- pipeline.setFeatureOptions('lastOpenKeys', pipeline.getStateAtKey(stateKey) || openKeys);
10539
+ pipeline.setFeatureOptions('lastOpenKeys', openKeys);
10540
+ pipeline.setFeatureOptions('lastSort', curSort);
10539
10541
  var result = [];
10540
10542
  dfs(input, 0);
10541
10543
  function dfs(nodes, depth) {