Describe the bug
The ChildChanged event on the Blazor ViewModel is not getting triggered when the Model object is of type BusinessListBase. It looks like it only triggers for IBusinessBase objects.
Version and Platform
CSLA version: 9.1.0
OS: Windows
Platform: Blazor Server
Code that Fails
/// <summary>
/// Unhooks changed event handlers from the model.
/// </summary>
/// <param name="model"></param>
protected void UnhookChangedEvents(T? model)
{
if (model is INotifyPropertyChanged npc)
npc.PropertyChanged -= OnModelPropertyChanged;
if (model is IBusinessBase ncc)
ncc.ChildChanged -= OnModelChildChanged;
if (model is INotifyCollectionChanged cc)
cc.CollectionChanged -= OnModelCollectionChanged;
}
/// <summary>
/// Hooks changed events on the model.
/// </summary>
/// <param name="model"></param>
private void HookChangedEvents(T? model)
{
if (model is INotifyPropertyChanged npc)
npc.PropertyChanged += OnModelPropertyChanged;
if (model is IBusinessBase ncc)
ncc.ChildChanged += OnModelChildChanged;
if (model is INotifyCollectionChanged cc)
cc.CollectionChanged += OnModelCollectionChanged;
}
Additional context
I think changing the above code to check for INotifyChildChanged instead of IBusinessBase would solve this issue.
Describe the bug
The ChildChanged event on the Blazor ViewModel is not getting triggered when the Model object is of type BusinessListBase. It looks like it only triggers for IBusinessBase objects.
Version and Platform
CSLA version: 9.1.0
OS: Windows
Platform: Blazor Server
Code that Fails
Additional context
I think changing the above code to check for INotifyChildChanged instead of IBusinessBase would solve this issue.