Newer Version Available
aura:doneWaiting
Indicates that the app or component 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 event="aura:doneWaiting"> tag to handle this event.
This
example hides a spinner when aura:doneWaiting is
fired.
1<aura:handler event="aura:doneWaiting" action="{!c.hideSpinner}"/>1<aura:component>
2 <aura:handler event="aura:doneWaiting" action="{!c.hideSpinner}"/>
3 <!-- Other component markup here -->
4 <center><ui:spinner aura:id="spinner"/></center>
5</aura:component>This
client-side controller fires an event that hides the
spinner.
The
aura:doneWaiting handler contains these
required attributes.
1({
2 hideSpinner : function (component, event, helper) {
3 var spinner = component.find('spinner');
4 var evt = spinner.get("e.toggle");
5 evt.setParams({ isVisible : false });
6 evt.fire();
7 }
8})| 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. |