Skip to content

fix: keep scroll position when setting item selectable provider - #9644

Merged
vursen merged 2 commits into
mainfrom
fix/grid-selectable-provider-scroll-position
Jul 1, 2026
Merged

fix: keep scroll position when setting item selectable provider#9644
vursen merged 2 commits into
mainfrom
fix/grid-selectable-provider-scroll-position

Conversation

@vursen

@vursen vursen commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

This PR changes setItemSelectableProvider to use refreshViewport() instead of dataCommunicator.reset() to avoid resetting TreeGrid's scroll position and adds a corresponding test to TreeGridScrollPositionIT.

setItemSelectableProvider called getDataCommunicator().reset(),
which resets the scroll position to the top. Use refreshViewport()
instead, like other Grid setters that only need to re-render visible
rows.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@vursen
vursen requested a review from sissbruecker July 1, 2026 08:03
@vursen vursen changed the title fix: keep scroll position when setting item selectable provider fix: do not reset TreeGrid's scroll position when setting item selectable provider Jul 1, 2026
@vursen vursen changed the title fix: do not reset TreeGrid's scroll position when setting item selectable provider fix: do not reset scroll position when setting item selectable provider Jul 1, 2026
@vursen vursen changed the title fix: do not reset scroll position when setting item selectable provider fix: avoid resetting scroll position when setting item selectable provider Jul 1, 2026
@vursen vursen changed the title fix: avoid resetting scroll position when setting item selectable provider fix: keep scroll position when setting item selectable provider Jul 1, 2026
@vursen vursen changed the title fix: keep scroll position when setting item selectable provider fix: keep TreeGrid's scroll position when setting item selectable provider Jul 1, 2026
@vursen vursen changed the title fix: keep TreeGrid's scroll position when setting item selectable provider fix: keep TreeGrid's scroll position when setting itemSelectableProvider Jul 1, 2026
@vursen vursen changed the title fix: keep TreeGrid's scroll position when setting itemSelectableProvider fix: keep scroll position when setting item selectable provider Jul 1, 2026
@vursen
vursen requested a review from web-padawan July 1, 2026 09:03
@vursen
vursen added this pull request to the merge queue Jul 1, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to a conflict with the base branch Jul 1, 2026
@vursen

vursen commented Jul 1, 2026

Copy link
Copy Markdown
Contributor Author

@copilot resolve the merge conflicts in this pull request

Copilot AI commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

@copilot resolve the merge conflicts in this pull request

Resolved. Both TreeGridScrollPositionPage.java and TreeGridScrollPositionIT.java had conflicts where this PR added the set-item-selectable-provider button/test and main added set-enabled in the same location — both additions are now kept. Merge commit: chore: merge main into fix/grid-selectable-provider-scroll-position.

Copilot finished work on behalf of vursen July 1, 2026 09:30
@vursen
vursen enabled auto-merge July 1, 2026 09:42
@sonarqubecloud

sonarqubecloud Bot commented Jul 1, 2026

Copy link
Copy Markdown

@vursen
vursen added this pull request to the merge queue Jul 1, 2026
Merged via the queue into main with commit 1656ee6 Jul 1, 2026
21 checks passed
@vursen
vursen deleted the fix/grid-selectable-provider-scroll-position branch July 1, 2026 09:53
vursen added a commit that referenced this pull request Jul 1, 2026
… (#9655)

This PR cherry-picks changes from the original PR #9644 to branch 25.1.
---
#### Original PR description
> This PR changes `setItemSelectableProvider` to use `refreshViewport()`
instead of `dataCommunicator.reset()` to avoid resetting TreeGrid's
scroll position and adds a corresponding test to
`TreeGridScrollPositionIT`.

Co-authored-by: Sergey Vinogradov <mr.vursen@gmail.com>
Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
vursen added a commit that referenced this pull request Jul 1, 2026
… (#9654)

This PR cherry-picks changes from the original PR #9644 to branch 25.2.
---
#### Original PR description
> This PR changes `setItemSelectableProvider` to use `refreshViewport()`
instead of `dataCommunicator.reset()` to avoid resetting TreeGrid's
scroll position and adds a corresponding test to
`TreeGridScrollPositionIT`.

Co-authored-by: Sergey Vinogradov <mr.vursen@gmail.com>
Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
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.

4 participants