Skip to content

fix(Tree): remove value-key in favor of get-key#4999

Merged
benjamincanac merged 11 commits intov4from
fix/tree-value
Sep 18, 2025
Merged

fix(Tree): remove value-key in favor of get-key#4999
benjamincanac merged 11 commits intov4from
fix/tree-value

Conversation

@sandros94
Copy link
Member

@sandros94 sandros94 commented Sep 17, 2025

🔗 Linked issue

Resolves #3762

❓ Type of change

  • 📖 Documentation (updates to the documentation or readme)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • 👌 Enhancement (improving an existing functionality)
  • ✨ New feature (a non-breaking change that adds functionality)
  • 🧹 Chore (updates to the build process or auxiliary tools and libraries)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

📚 Description

The type support for Tree commponent was almost completely broken, but more importantly it had the same value key which other components do use to extract a specific value from the object input, but UTree doesn't actually extract the value, it returns the whole object. What it does require is a unique index for each item in the array, which is customizable via get-key prop, that when undefined it falls back to label, this should cover for most generic uses of the component, even small improper ones.

Intentionally not mentioning this in the v4 migration, as it was broken to begin with in v3.

📝 Checklist

  • I have linked an issue or discussion.
  • I have updated the documentation accordingly.

@pkg-pr-new
Copy link

pkg-pr-new bot commented Sep 17, 2025

npm i https://pkg.pr.new/@nuxt/ui@4999

commit: 66ae96b

@sandros94 sandros94 changed the title fix(Tree): model/default value wrong type, drop value and introduce index-key prop fix(Tree): model/default value wrong type, drop value and introduce get-key prop Sep 17, 2025
@benjamincanac benjamincanac changed the title fix(Tree): model/default value wrong type, drop value and introduce get-key prop fix(Tree): remove value-key in favor of get-key Sep 18, 2025
benjamincanac and others added 2 commits September 18, 2025 12:13
Co-authored-by: vercel[bot] <35613825+vercel[bot]@users.noreply.github.com>
@benjamincanac benjamincanac merged commit 240ff42 into v4 Sep 18, 2025
16 checks passed
@benjamincanac benjamincanac deleted the fix/tree-value branch September 18, 2025 11:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

v4 #4488

Projects

None yet

Development

Successfully merging this pull request may close these issues.

UTree value-key not working

2 participants