Closed gimmyhehe closed 1 week ago
The pull request introduces several modifications to the tree component's functionality, primarily in the packages/renderless/src/tree-node/index.ts
file. Key changes include the addition of two functions for managing icons and indentation, updates to click handling logic to prevent unintended collapses, and refinements in event handling for state changes. The package.json
file reflects a version update, while the TreeNode
component in the Vue file gains a new reference for the content section, impacting event propagation.
File Path | Change Summary |
---|---|
packages/renderless/src/tree-node/index.ts | - Added computedExpandIcon and computedIndent functions. - Updated handleClick to prevent parent collapse on whitespace clicks. - Refined handleCheckChange for state management. - Enhanced handleContextMenu for better visibility management. |
packages/vue/src/tree/package.json | - Updated version from 3.19.1 to 3.19.2 . |
packages/vue/src/tree/src/tree-node.vue | - Added ref="content" to the content div. - Removed @click.stop from tiny-checkbox . |
Objective | Addressed | Explanation |
---|---|---|
Cancel event trigger on whitespace clicks to avoid unintended collapses (2491) | ✅ |
🐰 In the tree where the branches sway,
A click on the whitespace won't lead you astray.
Icons now shine, and nodes stand tall,
With each little change, we’re having a ball!
So hop along, dear friends, don’t delay,
The tree's now a joy in every way! 🌳✨
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
… close #2491
PR
PR Checklist
Please check if your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
What is the current behavior?
Issue Number: N/A
What is the new behavior?
Does this PR introduce a breaking change?
Other information
close #2491
Summary by CodeRabbit
New Features
ref
attribute for improved manipulation of tree node content.Bug Fixes
Chores
@opentiny/vue-tree
package from 3.19.1 to 3.19.2.