ember-data-resources icon indicating copy to clipboard operation
ember-data-resources copied to clipboard

Request status properties are instantly fulfilled for record that is background reloading

Open evoactivity opened this issue 1 year ago • 1 comments

The properties isLoading, isSuccessful, hasRan, isError are resolved immediately even if the request is still running.

https://github.com/evoactivity/ember-data-resources-repro run pnpm start to bring up the server and ember app

findRecord is used here https://github.com/evoactivity/ember-data-resources-repro/blob/main/front/app/components/channel.gjs

It is due to the record existing because it is loaded in the application route initially, but I need more relationships so run a find record again, which resolves immediately but is running a background reload. Using reload: true option makes it work as expected. Would there be some way to have an isBackgroundReloading property?

evoactivity avatar Oct 24 '24 18:10 evoactivity

yea, I think a background reloading property makes sense!

NullVoxPopuli avatar Oct 24 '24 18:10 NullVoxPopuli