Skip to content

docs: note the Vaadin 26 hierarchy format default change - #6032

Open
totally-not-ai[bot] wants to merge 1 commit into
mainfrom
docs/treedata-v26-default-change
Open

totally-not-ai[bot] wants to merge 1 commit into
mainfrom
docs/treedata-v26-default-change

Conversation

@totally-not-ai

Copy link
Copy Markdown
Contributor

Summary

Vaadin 25.3 deprecates three Tree Grid data-binding entry points because the hierarchy format they pick for you changes in Vaadin 26:

  • vaadin/flow#24908TreeDataProvider(TreeData) defaults to HierarchyFormat.NESTED today, FLATTENED from Vaadin 26.
  • vaadin/flow#24940setItems(...) and setTreeData(...) create that provider under the hood, so they change the same way.

The Tree Grid Binding Data page teaches both setItems() and the provider, so a reader following it now gets a deprecation warning with nothing explaining it.

What changed

Two notes in articles/components/tree-grid/data-binding.adoc:

  • Setting Items — the setItems() / setTreeData() shorthands are deprecated; they create a NESTED provider today and a FLATTENED one from Vaadin 26, which affects methods whose behavior depends on the format, such as scrollToIndex(). To keep today's behavior, build the TreeDataProvider explicitly and pass it to setDataProvider().
  • Tree Data Provider — added to the existing note that already recommends FLATTENED: the single-argument constructor is deprecated for the same reason, so pass the format explicitly.

The HierarchyFormat.NESTED (default) heading further down is left alone on purpose: NESTED remains the default of HierarchicalDataProvider.getHierarchyFormat() for custom providers; only what TreeDataProvider and the shorthands choose is changing.

How to test

Documentation only, no code examples added, so nothing to compile. The wording matches the @deprecated javadoc of TreeDataProvider and HasHierarchicalDataProvider in 25.3.

Vaadin 25.3 deprecates the setItems and setTreeData shorthands and the
single-argument TreeDataProvider constructor, because the hierarchy
format they default to changes from NESTED to FLATTENED in Vaadin 26.
The Tree Grid data binding page documented neither the deprecation nor
the coming change, so a reader following it hits a deprecation warning
with no explanation.

Both places now say what changes, that it affects methods like
scrollToIndex, and how to keep the current behavior by passing the
format explicitly.
@github-actions

Copy link
Copy Markdown
Contributor

Preview Deployment

This PR has been deployed for preview.

URL: https://docs-preview-pr-6032.fly.dev

Changed pages

Added content is highlighted in green; removed content is marked in red on each page.

Built from 29b716e

@peholmst peholmst added the target/v25.3 Automatically cherry-pick to the v25.3 branch label Sep 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

target/v25.3 Automatically cherry-pick to the v25.3 branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant