ReactiveUI
ReactiveUI copied to clipboard
ReactiveAsyncCommand CanExecute not updated immediately
I ran into a situation where a user action changed a set of conditions that should have caused a command to allow execution. But since CanExecute is scheduled, the command silently failed thinking it wasn't allowed to execute.
Consider making sure CanExecute updates changes immediately.
Both ReactiveCommand and ReactiveAsyncCommand have this issue
Example and STR
- keyboard focus is in a text box that needs to be validated on tab out
- the text box contains invalid data
- view-model contains a ReactiveCommand where CanExecute is connected to the validation result of the text box
Clicking on a button connected to the command should never call the Execute function
Some implicit scheduling has been removed in #516. Please reopen if this is still an issue.