Open bobisjan opened 5 years ago
Based on the implementation, I believe this is intentional, as it does clone the original task. However, you should be able to use the let
helper to access the isRunning
for a curried task within the template:
e.g.
{{#let (task this.hi) as |newTask|}}
{{#if newTask.isRunning}}
Trying to say hi...
{{else}}
<button onclick={{action (perform newTask)}}>
Say Hi
</button>
{{/if}}
{{/let}}
Caveat: other task state may be shared with the original task (See https://github.com/machty/ember-concurrency/issues/258)
Hi,
when having
task
defined like thiswith button
then it logs
this.hi.isRunning true
,but with button using
(task
helperthen it logs
this.hi.isRunning false
.I'm not sure if this is a bug or expected behaviour, but currently this disallows using
task.isRunning
property with(task
helper?Thanks