aura:doneWaiting

Indicates that the app is done waiting for a response to a server request. This event is preceded by an aura:waiting event. This event is fired after aura:waiting.
Note

Note

We don't recommend using the legacy aura:doneWaiting event except as a last resort. The aura:doneWaiting application event is fired for every server response, even for responses from other components in your app. Unless your component is running in complete isolation in a standalone app and not included in Lightning Experience or Salesforce1, you probably don’t want to handle this application event. The container app may fire server-side actions and trigger your event handler multiple times.

This event is automatically fired if no more response from the server is expected. The aura:doneWaiting event is handled by a client-side controller. A component can have only one <aura:handler> tag to handle this event.
<aura:handler event="aura:doneWaiting" action="{!c.hideSpinner}"/>
This example hides a spinner when aura:doneWaiting is fired.
<aura:component>
     <aura:handler event="aura:doneWaiting" action="{!c.hideSpinner}"/>
    <!-- Other component markup here -->
    <center><ui:spinner aura:id="spinner"/></center>
</aura:component>
This client-side controller fires an event that hides the spinner.
({
    hideSpinner : function (component, event, helper) {
        var spinner = component.find('spinner');
        var evt = spinner.get("e.toggle");
        evt.setParams({ isVisible : false });
        evt.fire();    
    }
})
The aura:doneWaiting handler contains these required attributes.
Attribute Name Type Description
event String The name of the event, which must be set to aura:doneWaiting.
action Object The client-side controller action that handles the event.