reactivemarbles / DynamicData

Reactive collections based on Rx.Net
http://dynamic-data.org
MIT License
1.73k stars 182 forks source link

WhenValueChanged() does not handle INPC on n+1 level properties #83

Closed DaRosenberg closed 7 years ago

DaRosenberg commented 7 years ago

This does not work:

mDataManager.MainModel.ClockModelList
    .ToObservableChangeSet()
    .WhenValueChanged(x => x.Clock.Name)
    .Subscribe(newClockName =>
    {
        Debug.WriteLine("***** Clock name changed!"); // <- Fires only on initial values.
    });

But this works:

mDataManager.MainModel.ClockModelList
    .ToObservableChangeSet()
    .Transform(x => x.Clock) // Have to transform...
    .WhenValueChanged(x => x.Name) // ... because this one doesn't handle INPC beyond first level.
    .Subscribe(newClockName =>
    {
        Debug.WriteLine("***** Clock name changed!");
    });
RolandPheasant commented 7 years ago

@DanielStolt it does now. I will deploy a prerelease version some time next week so you can try it out.