UTree: option to toggle expand/collapse only when expand/collapse icon is clicked
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 6.9k
- Forks
- 1.1k
- Avg merge
- 1d 7h
- Merged PRs (30d)
- 57
Description
Description
I think it could be helpful in some scenarios when clicking on the parent not automatically expands or collapses children.
In my use case I'm using UTree to build a mailbox-style tree, e.g.:
inbox
├── subfolder 1
│ ├── subsubfolder 2
Obviously not all emails will be in the most nested folder, some might in inbox, some might be in subfolder 1. Right now when clicking on inbox, I am loading the associated mails in a seperate component but it will also cause "inbox" to either collapse or expand. It was more intuitive if we were able to control wether clicking the whole item or just the toggle icon expands or collapses.
Additional context
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the UTree component implementation and its current expand/collapse handling. Check how parent-item clicks and the expand/collapse icon are distinguished, then verify that the new option allows expansion only from the icon while preserving the existing behavior by default.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100