ReactiveUI icon indicating copy to clipboard operation
ReactiveUI copied to clipboard

ReactiveAsyncCommand CanExecute not updated immediately

Open haacked opened this issue 13 years ago • 2 comments

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.

haacked avatar Feb 08 '13 19:02 haacked

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

chrisbednarski avatar Feb 27 '13 04:02 chrisbednarski

Some implicit scheduling has been removed in #516. Please reopen if this is still an issue.

jlaanstra avatar Apr 27 '14 20:04 jlaanstra