I think a better approach to handle that would be as parent/child components:
On the List component include the details/child component:
<c:DetailArticle aura:id="detailArticle" />
Then add an aura:method on the details/child component - instead of the event:
<aura:method name="openArticle" action="{!c.openArticle}" access="PUBLIC">
<aura:attribute name="articleId" type="String" />
</aura:method>
Now handle that method from your details/child component's controller:
openArticle : function(cmp, event) {
var params = event.getParam('arguments');
if (params) {
var atrId = params.articleId;
console.log("article id: " + atrId);
// add the article to the details page
}
}
Now on your parent list component controller, when you want to open the article detail page from your button list controller - fire the apexMethod event like that:
getDetail : function(component, event, helper){
// 1. get the details component
var details = component.find("DetailArticle")
// 2. get the article id
var articleId = event.target.getAttribute("data-recId");
// 3. run the child component init (aura:method)
details.openArticle(articleId);
}
You need to apply position: relative
to the component element, in your case uploadCard
. This contains the overlay to within the boundaries of your component The following code works as expected (jsfiddle.net) and overlays only your component:
<div aura:id="uploadCard" class="slds-card__header" style="position:relative">
<div class="slds-form--compound">
<div>content goes here</div>
<div class="slds-spinner_container" aura:id="uploadSpinner">
<div class="slds-spinner slds-spinner--medium" aria-hidden="false" role="alert">
<div class="slds-spinner__dot-a"></div>
<div class="slds-spinner__dot-b"></div>
</div>
</div>
</div>
</div>
It will render like this:
Alternatively, you can assign the class .slds-is-relative
which has the same effect:
<div aura:id="uploadCard" class="slds-card__header slds-is-relative">...</div>
Best Answer
Try to do it with some CSS changes and change use unique aura:id for both Do something like this ..
Component
CSS
Controller