Repository navigation
feat: add GridSorterElement and GridTHTDElement.getSorter() - #10378
Merged
Merged
Conversation
Add a TestBench element for <vaadin-grid-sorter> with isAscending() and isDescending() helpers, and a getSorter() getter on header cells that returns null when the cell has no sorter. Update the Grid sorting integration tests to use the new API instead of querying the sorter by tag name. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
TatuLund
marked this pull request as ready for review
October 8, 2026 15:15
vaadin-review-bot
left a comment
Collaborator
There was a problem hiding this comment.
✅ Nothing to flag — the changes look good.
sissbruecker
self-requested a review
October 9, 2026 08:09
sissbruecker
approved these changes
Oct 9, 2026
Collaborator
|
This ticket/PR has been released with Vaadin 25.4.0-alpha3. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Review risk: two-way door — additive TestBench API in
vaadin-grid-testbenchplus test-only changes; no impact on the Grid component itself.Summary
Adds a TestBench element for
<vaadin-grid-sorter>and a getter on header cells, so you can sort a Grid column in a TestBench test withgrid.getHeaderCell(0).getSorter().click()and check the sort state without querying the sorter by tag name. Clicking the header cell itself does nothing, since only the sorter reacts to clicks.What changed
GridSorterElement(@Element("vaadin-grid-sorter")) withisAscending()andisDescending().GridTHTDElement.getSorter(), which returns the cell's sorter, ornullwhen the cell has no sorter (following the TestBench convention of returningnullfor absent elements).$("vaadin-grid-sorter"),findElements(By.tagName("vaadin-grid-sorter")), rawdirectionproperty checks, and an inline JS helper.Test summary
getSorter()returning-nullpath is exercised by the filtering and header/footer row tests, which check that a header cell has no sorter.API Changes
com.vaadin.flow.component.grid.testbench.GridSorterElement
com.vaadin.flow.component.grid.testbench.GridTHTDElement
Fixes #7450
🤖 Generated with Claude Code