Lightning: Any way to check if the Skuid page in a component is rendered and display a 'loading' effect in the meantime?

  • 1
  • Question
  • Updated 9 months ago
  • Answered
  • (Edited)
Hey folks!

A Lightning component that includes a Skuid page will often render the Skuid page later than the rest of the component. This is often quite a short delay but is sometimes more pronounced. I was wondering if there was a way of checking to see if the Skuid page bit had rendered and conditionally displaying a loading wheel (or something like that) whilst the Skuid page is loading?

Cheers!

Louis
Photo of Louis Skelton

Louis Skelton

  • 4,786 Points 4k badge 2x thumb

Posted 9 months ago

  • 1
Photo of mB Pat Vachon

mB Pat Vachon, Champion

  • 42,674 Points 20k badge 2x thumb
What version of Skuid? Should be working in version 10.0.6. It wasn't showing the "Loading..." text up until this time. See this post.

https://community.skuid.com/skuid/topics/page-include-not-displaying-loading-text
Photo of Louis Skelton

Louis Skelton

  • 4,786 Points 4k badge 2x thumb
Yo - this is for a lightning component that includes a Skuid page - rather than a Skuid page including a Skuid page:

Something like this:

<aura:component>
    <aura:if isTrue="Skuid-page-has-rendered">

        <skuid:page page="Lovely_Skuid_Page" />

        <aura:set attribute="else">

            Some-Loading-Wheel-Thing

        </aura:set>

    </aura:if>
    
</aura:component>
Photo of mB Pat Vachon

mB Pat Vachon, Champion

  • 42,674 Points 20k badge 2x thumb
Yeah .... ok.

you could use javascript to introduce the blockui on page load and then a pageLoad model to create a row on page load to enable to model actions to subsequently unblock.
Photo of Louis Skelton

Louis Skelton

  • 4,786 Points 4k badge 2x thumb
That's a good idea. So use blockui and turn it off when an event is published from the Skuid page to the surrounding lightning component? Feels like a weekend project... I'll take a look!
Photo of Louis Skelton

Louis Skelton

  • 4,786 Points 4k badge 2x thumb
Oh wow - I just saw this - somehow missed it in my search: https://community.skuid.com/skuid/topics/is-it-possible-to-render-a-lightning-component-spinner-slds...

This looks to do the trick.