@v-c/tree 1.1.2 → 1.1.3

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.
Files changed (2) hide show
  1. package/dist/Tree.js +1 -6
  2. package/package.json +1 -1
package/dist/Tree.js CHANGED
@@ -82,12 +82,7 @@ var Tree = /* @__PURE__ */ defineComponent((props, { slots, attrs, expose }) =>
82
82
  return keys;
83
83
  };
84
84
  const expandedKeys = shallowRef(getInitExpandedKeys());
85
- /**
86
- * Set the uncontrolled `expandedKeys`. Guarded centrally so a controlled
87
- * `expandedKeys` is never clobbered — the watcher below owns it in that case.
88
- */
89
85
  const setExpandedKeys = (keys) => {
90
- if (props.expandedKeys !== void 0) return;
91
86
  expandedKeys.value = keys;
92
87
  };
93
88
  watch(() => props.expandedKeys, () => {
@@ -480,7 +475,7 @@ var Tree = /* @__PURE__ */ defineComponent((props, { slots, attrs, expose }) =>
480
475
  let newExpandedKeys = [...expandedKeys.value];
481
476
  const entity = getEntity(keyEntities.value, nodeProps.eventKey);
482
477
  if (entity && (entity.children || []).length) newExpandedKeys = arrAdd(expandedKeys.value, nodeProps.eventKey);
483
- setExpandedKeys(newExpandedKeys);
478
+ if (props.expandedKeys === void 0) setExpandedKeys(newExpandedKeys);
484
479
  props.onExpand?.(newExpandedKeys, {
485
480
  node: convertNodePropsToEventData(nodeProps),
486
481
  expanded: true,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@v-c/tree",
3
3
  "type": "module",
4
- "version": "1.1.2",
4
+ "version": "1.1.3",
5
5
  "description": "",
6
6
  "publishConfig": {
7
7
  "access": "public"