ember-power-select icon indicating copy to clipboard operation
ember-power-select copied to clipboard

Allow ember-concurrency task `Promise<void>` in @search arg

Open johanrd opened this issue 6 months ago • 1 comments

Type support for case where ember-concurrency task.perform is set as the search function.

restartableTask<unknown, (term: string) => Promise>(asyncArrowTaskFn: (term: string) => Promise): TaskForAsyncTaskFunction<unknown, (term: string) => Promise> (+4 overloads)

updateSearch = restartableTask(async (term: string) => {
  await timeout(250)
  this.router.transitionTo({ queryParams: { search: term } })
})
<PowerSelect
  @search={{this.updateSearch.perform}}
/>

johanrd avatar May 07 '25 13:05 johanrd

okay, i see the integration tests fail. Not sure how to deal with that atm, as the search action may not return anything itself, if just writing reactive state to the url.

johanrd avatar May 07 '25 14:05 johanrd