vaadin / vaadin/framework

Missing addItemAt in TreeGrid (TreeData)

Open
#9,750 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Java
Stars
1.8k
Forks
717
Avg merge
2d 6h
Merged PRs (30d)
3

Description

Reordering items in a TreeGrid is a real pain at the moment in 8.1.0.
There's the method moveAfterSibling but it only works with items having the same parent. Also just "after" sibling so if you want to move an item to first place it gets hacky.
A method like addItemAt(index, parent, item) would really help to reorder the hierarchical data (e.g. by drag and drop)
Also the option to keep the children when moving a parent node would be really helpful.

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 examining the TreeGrid and TreeData APIs, especially moveAfterSibling, to understand the current reordering constraints. Define the behavior needed for addItemAt across different parents, moving items to the first position, and preserving children when moving a parent. Done should include a settled API design and coverage for these cases.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
frontend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.