We are deploying a skuid page through a lightning component, which is placed into the right hand panel on a record detail page in lightning. The content of the skuid page takes a little while to load.
Would it be possible to show a spinner whilst waiting for this content to load, to show the user that there is more information coming into the page?
Ideally this would use the “aura:renderIf” attribute within the lightning component - https://developer.salesforce.com/docs/atlas.en-us.lightning.meta/lightning/aura_compref_aura_renderI…
e.g.
<aura:component implements="flexipage:availableForRecordHome,force:hasRecordId" access="global">
<aura:attribute name="pageLoadComplete" type="Boolean" />
<aura:renderIf isTrue="{!v.pageLoadComplete}">
<skuid:page page="InquirySectorsComponent" id="{!v.recordId}" />
<aura:set attribute="else">
<!-- show the spinner until the page is loaded -->
<div class="demo-only" style="height: 6rem;">
<div role="status" class="slds-spinner slds-spinner_medium"> <span class="slds-assistive-text">Loading</span> <div class="slds-spinner__dot-a"></div> <div class="slds-spinner__dot-b"></div> </div> </div> </aura:set> </aura:renderIf> </aura:component>
Ideally the skuid page would need to set the component attribute (aura:attribute pageLoadComplete) variable to ‘true’ once it has finished loading. But this would require the skuid page to update a value in the lightning component, and I’m not sure whether this is possible.