hy-virtual-tree 2.0.13 → 2.0.15
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 +12 -0
- package/dist/index.js +15 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hy-virtual-tree v2.0.
|
|
1
|
+
/* hy-virtual-tree v2.0.15 */
|
|
2
2
|
import './svg_bundle.js';
|
|
3
3
|
const isString = (e) => typeof e === 'string';
|
|
4
4
|
const isNumber = (e) => typeof e === 'number';
|
|
@@ -9689,6 +9689,7 @@ class VirtualTree {
|
|
|
9689
9689
|
if (this._virtualScroll)
|
|
9690
9690
|
return;
|
|
9691
9691
|
this._tree = await this._createTree(config.data);
|
|
9692
|
+
this._renderHandler();
|
|
9692
9693
|
this._flattenTree = this._genereateFlattenTree();
|
|
9693
9694
|
const { checkedKeys, updateCheckedKeys, isIndeterminate, isChecked, toggleCheckbox, getChecked, afterNodeCheck, getCheckedKeys, getCheckedNodes, getCheckedBusinessNodes,
|
|
9694
9695
|
// getHalfCheckedKeys,
|
|
@@ -10153,6 +10154,7 @@ class VirtualTree {
|
|
|
10153
10154
|
// this._destroyDomSet.delete($destroy)
|
|
10154
10155
|
// }
|
|
10155
10156
|
this._isForceHiddenExpandIcon = undefined;
|
|
10157
|
+
this._renderHandler();
|
|
10156
10158
|
this._updateCheckedKeys();
|
|
10157
10159
|
this._refreshVirtualScroll();
|
|
10158
10160
|
callback && callback();
|
|
@@ -10196,6 +10198,17 @@ class VirtualTree {
|
|
|
10196
10198
|
}
|
|
10197
10199
|
};
|
|
10198
10200
|
})();
|
|
10201
|
+
/** 渲染初始化 */
|
|
10202
|
+
_isRenderInitial = false;
|
|
10203
|
+
_renderHandler() {
|
|
10204
|
+
if (this._isRenderInitial)
|
|
10205
|
+
return;
|
|
10206
|
+
const expandedKeys = new Set(this._tree.treeNodeMap.keys());
|
|
10207
|
+
if (expandedKeys.size) {
|
|
10208
|
+
this._expandedKeySet = expandedKeys;
|
|
10209
|
+
this._isRenderInitial = true;
|
|
10210
|
+
}
|
|
10211
|
+
}
|
|
10199
10212
|
/** 获取指定节点 */
|
|
10200
10213
|
getNode = (data) => {
|
|
10201
10214
|
const key = isObject(data)
|
|
@@ -10335,6 +10348,7 @@ class VirtualTree {
|
|
|
10335
10348
|
}, this._filterMethod, this._tree);
|
|
10336
10349
|
const keys = doFilter(params, filterAll);
|
|
10337
10350
|
if (keys) {
|
|
10351
|
+
this._expandedKeySet = keys;
|
|
10338
10352
|
this._hiddenExpandIconKeySet = hiddenExpandIconKeySet;
|
|
10339
10353
|
this._hiddenNodeKeySet = hiddenNodeKeySet;
|
|
10340
10354
|
this._isForceHiddenExpandIcon = isForceHiddenExpandIcon;
|