Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removed ClearRowSelection when action is SelectFromAnchorToCurrent. #14738

Merged
merged 2 commits into from
Feb 29, 2024
Merged

Removed ClearRowSelection when action is SelectFromAnchorToCurrent. #14738

merged 2 commits into from
Feb 29, 2024

Conversation

Brubning
Copy link
Contributor

@Brubning Brubning commented Feb 26, 2024

What does the pull request do?

This PR fixes issue 14737 #14737 by retaining the current selection when selecting a range of rows in DataGrid.

What is the current behavior?

Currently non-consecutive blocks can not be selected because the current selection is cleared when a range is being selected.

What is the updated/expected behavior with this PR?

Removed the call to ClearRowSelection when the DataGridSelectionAction is SelectFromAnchorToCurrent. The logic for selection is already robust to this change i.e. can select ranges forward/backward, cover existing selections, add new items to existing selection etc.

How was the solution implemented (if it's not obvious)?

Removed a single method call.

Checklist

Would like some advice on how to approach unit testing. This doesn't look like it impacts on documentation.

Breaking changes

N/A

Obsoletions / Deprecations

N/A

Fixed issues

Fixes #14737

@Brubning
Copy link
Contributor Author

@dotnet-policy-service agree

@avaloniaui-bot
Copy link

You can test this PR using the following package version. 11.1.999-cibuild0045359-beta. (feed url: https://nuget-feed-all.avaloniaui.net/v3/index.json) [PRBUILDID]

@avaloniaui-bot
Copy link

You can test this PR using the following package version. 11.1.999-cibuild0045387-beta. (feed url: https://nuget-feed-all.avaloniaui.net/v3/index.json) [PRBUILDID]

@maxkatz6 maxkatz6 added this pull request to the merge queue Feb 29, 2024
@maxkatz6 maxkatz6 removed this pull request from the merge queue due to a manual request Feb 29, 2024
@maxkatz6 maxkatz6 added this pull request to the merge queue Feb 29, 2024
Merged via the queue into AvaloniaUI:master with commit c466e96 Feb 29, 2024
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

DataGrid CollectionView calls ClearRowSelection incorrectly with action SelectFromAnchorToCurrent
3 participants