-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Selection breaks after deleting item. #4293
Labels
Comments
This is caused by the order of subscriptions to the source list between |
grokys
added a commit
that referenced
this issue
Jul 14, 2020
`SelectionModel` needs to subscribe to `CollectionChanged` on the items before `ItemsControl` in order for the selection to be correct when we come to setting the selected state. Because `SelectionModel.Source` isn't subscribed during initialization in `ItemsChanged`, we also need to make sure we don't subscribe `ItemsControl` to the collection changes during initialization. Instead subscribe in `OnInitialized` (this requires a few tests to be rooted in order to be called). Fixes #4293
grokys
added a commit
that referenced
this issue
Jul 16, 2020
1 task
donandren
added a commit
to donandren/Avalonia
that referenced
this issue
Oct 23, 2020
danwalmsley
added a commit
that referenced
this issue
Oct 23, 2020
macos fix crash on popup close #4293
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Selection in
ListBox
is currently broken if one deletes the currently selected item:The above gif shows a
ListBox
with single selection. If the currently selected item is deleted, a "ghost" selection moves to the subsequent item and is only removed when the item is selected and then unselected again.The text was updated successfully, but these errors were encountered: