nuxt / nuxt/ui

UTree: option to toggle expand/collapse only when expand/collapse icon is clicked

Open
#3,496 3 comments 1 reaction 0 assignees View on GitHub

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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.