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

SelectedItem(s) should be persisted when paginating or sorting #157

Open
symbiogenesis opened this issue Jan 27, 2024 · 0 comments
Open

Comments

@symbiogenesis
Copy link
Collaborator

symbiogenesis commented Jan 27, 2024

The current selection logic is based on the internal CollectionView.

This implementation is elegant and maintainable, but loses selected items when paginating. Or when sorting while pagination is enabled.

It isn't always obvious that they should be persisted when paginating, but it does seem obvious if the SelectedItem(s) are being driven by a ViewModel that they should be.

There could be an argument to re-engineer it entirely. But it seems like a massive overhaul because we couldn't just bind to the CollectionView or rely on its SelectionChanged event at all.

Perhaps the best approach would be to cache the SelectedItem(s) prior to sorting or paginating, and then restore them.

I should be able to make this happen.

@symbiogenesis symbiogenesis changed the title Should SelectedItem(s) be persisted when paginating? SelectedItem(s) should be persisted when paginating or sorting Feb 26, 2024
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

No branches or pull requests

1 participant