-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Closed
Labels
Description
I upgraded to latest version (from 14.1.1 to 14.2.1) and, suddenly, InvokeCommand from an observable stopped to invoke my command. Command espects an Unit (in this context) as input, but command invocation is ignored. If I force to invoke manually that command, it executes correctly, but not via binding. Command doesn't have any validation for CanExecute or nothing.
Steps To Reproduce
1 - Command creation:
this.InitializeCommand = ReactiveCommand.CreateFromObservable<TInput, Unit>(
inputCmd =>
{
// Never enters via InvokeCommand, but enters when Execute call method is used.
return Observable.FromAsync(
async ct =>
{
.....
})
.TakeUntil(this.CancelInitializeCommand);
});2 - Binding initialization:
this.WhenAnyValue(vm => vm.Input)
// .Do(_ => Debug.WriteLine("Arrives?") --> YES, it arrives
.WhereNotNull()
// .Do(_ => Debug.WriteLine("Arrives?") --> YES, it arrives
.DistinctUntilChanged()
// .Do(_ => Debug.WriteLine("Arrives?") --> YES, it arrives
.InvokeCommand(this.InitializeCommand) // Does nothing
.DisposeWith(d);Expected behavior
Command is called on InvokeCommand.
Environment
- OS: Windows 10
- Version 21H1
- Device: PC
- Application Type: WinForms Application
- SDK: .NET Framework 4.7.2