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.
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.
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. |