Usage
itemsInQueue the page shows a progress bar that every ctx.loading.completeOne() moves on. There is nothing to call at the end: the loading state goes away by itself with the next io call or when the action returns.

ctx.loading.start()
Starts the loading state.ctx.loading.update()
Takes the same arguments asstart(), all optional, and changes only what you pass: the count of completed items stays. Called before start(), it starts the loading state.
ctx.loading.completeOne()
Marks one more item as done whenstart() or update() was given itemsInQueue; the progress bar shows how many are done, e.g. 5 of 12. Without itemsInQueue it does nothing, and the count never goes past it.
ctx.loading.completeAll()
Marks every item as done, so the progress bar shows 12 of 12, e.g. when the loop stops early because the rest is already done. LikecompleteOne(), it does nothing without itemsInQueue.
Behaviour
- The loading state lasts until the next io call shows its form, or until the action returns, fails or is canceled.
- Calling
start()again replaces the label and description and counts the completed items from zero;update()keeps the count. - Without it, a running action without a form shows Running….
- After the run has ended, the call does nothing.