Skip to content

fix: include descendant items in TreeGrid selectAll (#9819) (CP: 25.2) - #9830

Merged
vursen merged 1 commit into
25.2from
cherry-pick-9819-to-25.2-1786000933803
Aug 6, 2026
Merged

fix: include descendant items in TreeGrid selectAll (#9819) (CP: 25.2)#9830
vursen merged 1 commit into
25.2from
cherry-pick-9819-to-25.2-1786000933803

Conversation

@vaadin-bot

Copy link
Copy Markdown
Collaborator

This PR cherry-picks changes from the original PR #9819 to branch 25.2.

Original PR description

Calling selectAll() on GridMultiSelectionModel used to fetch items with a non-hierarchical query. With a hierarchical data provider, this resulted in an IllegalArgumentException in Vaadin 23 and 24.

Since Vaadin 25, HierarchicalDataCommunicator.buildQuery returns a root-level hierarchical query, so the exception is gone, but selectAll() still selects only root items.

The clientSelectAll method already handles hierarchical data providers by fetching all descendants recursively. This change extracts that logic into a shared method and makes selectAll() use it too, so both behave the same.

Fixes #9816

Calling `selectAll()` on GridMultiSelectionModel used to fetch items
with a non-hierarchical query. With a hierarchical data provider, this
resulted in an IllegalArgumentException in Vaadin 23 and 24.

Since Vaadin 25, `HierarchicalDataCommunicator.buildQuery` returns a
root-level hierarchical query, so the exception is gone, but
`selectAll()` still selects only root items.

The `clientSelectAll` method already handles hierarchical data providers
by fetching all descendants recursively. This change extracts that logic
into a shared method and makes `selectAll()` use it too, so both behave
the same.

Fixes #9816

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
@sonarqubecloud

sonarqubecloud Bot commented Aug 6, 2026

Copy link
Copy Markdown

@vursen
vursen enabled auto-merge (squash) August 6, 2026 07:37
@vursen
vursen merged commit 16fd466 into 25.2 Aug 6, 2026
20 checks passed
@vursen
vursen deleted the cherry-pick-9819-to-25.2-1786000933803 branch August 6, 2026 07:37
@vaadin-bot

Copy link
Copy Markdown
Collaborator Author

This ticket/PR has been released with Vaadin 25.2.6.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants