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

AdvancedCollectionView - Re sort all items when PropertyChanged notifications has no parameters #2304

Merged
merged 4 commits into from
Jul 23, 2018

Conversation

Bmartin2013
Copy link

@Bmartin2013 Bmartin2013 commented Jul 17, 2018

Issue: #2143

PR Type

What kind of change does this PR introduce?

Bugfix

What is the current behavior?

When you modify an element used by an AdvancedCollectionView and it has the INotifyPropertyChanged interface implemented with the onPropertyChange method without the propertyName parameter, it doesn't resort.That's because the AdvancedColectionView's treatment for PropertyChanged notifications doesn't control the case in which it has an empty or null propertyName, and therefore, ignores the situation.

What is the new behavior?

This control will cover the case which the onPropertyChange method has no propertyName

refreshes-with-notify-changed-empty

PR Checklist

Please check if your PR fulfills the following requirements:

  • [x ] Contains NO breaking changes

@@ -485,6 +485,10 @@ private void ItemOnPropertyChanged(object item, PropertyChangedEventArgs e)

OnVectorChanged(new VectorChangedEventArgs(CollectionChange.ItemInserted, targetIndex, item));
}
else if (e.PropertyName == "" || e.PropertyName == null)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you could probably replace this with string.IsNullOrEmpty

@azchohfi azchohfi merged commit cdd9011 into CommunityToolkit:master Jul 23, 2018
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.

3 participants