function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Ganesh EkhandeGanesh Ekhande 

Spinner display getting delayed based on number of records being displayed on the current component

I have 2 lightning components. I am displaying list of parent on the first component. when I click on the any specific parent I am displaying all associated child for that parent in the 2nd component. I am using event to pass selected parent from component 1 to component 2. I am displaying loading spinner when user select(click on) parent record, until 2nd component is rendered. The issue is if number of records on the first component is high, spinner display is getting delayed. Delay is dependent on the number of records being displayed on the current component(Component 1). Does anybody know solution for this issue?
NagendraNagendra (Salesforce Developers) 
Hi Ganesh,

You need to use following events.
<!--Event for Spinner Control-->
<aura: handler event="aura:waiting" action="{!c.hideSpinner}" />
<aura: handler event="aura:donewaiting" action="{!c.hideSpinner}" />
These events fires when framework makes AJAX request in the server.

Hope this helps.

Mark this as solved if it's resolved.