machty / ember-concurrency

ember-concurrency is an Ember Addon that enables you to write concise, worry-free, cancelable, restartable, asynchronous tasks.
http://ember-concurrency.com
MIT License
691 stars 155 forks source link

Allow setting `cancelAll()` options on `{{cancel-all}}` helper #544

Open nwhittaker opened 8 months ago

nwhittaker commented 8 months ago

An enhancement request to add support to the {{cancel-all}} helper for passing options through to the task's cancelAll() method.

Observed

Currently the helper only passes on the task and sets a hard-coded reason: https://github.com/machty/ember-concurrency/blob/90cca1ecbd117a9206cd299781940376657245b0/addon/helpers/cancel-all.js#L16-L19

Expected

The helper has optional args for setting the cancelAll options:

{{cancel-all this.task reason='…' resetState=true}}