There are list of rows, When I hover on particular row this popup should be activated. How this can be done. Whenever I hover i get data popup works fine but it flickers a lot :(
This is my component.
<aura:iteration items="{!v.SelectedWrapperItems}" var="vSWI" indexVar="index">
<a href="{!'/one/one.app?#/sObject/' +vSWI.owOLI.OpportunityProductBundle__c + '/view'}"
data-recId="{!vSWI.owOLI.OpportunityProductBundle__c}" data-index="{!index}"
target="_blank" onmouseenter="{!c.handleMouseOver}" onmouseout="{!c.handleMouseOut}"
tabindex="-1">
{!vSWI.owOLI.OpportunityProductBundle__r.Name}
<aura:if isTrue="{!v.hoverRow==index}">
<div style="padding-left: 2rem; padding-top: 5rem; position: relative;">
<div class="slds-popover slds-popover_tooltip slds-nubbin_top-left slds-rise-from-ground"
role="tooltip" id="help" style="position: absolute; top: 0px; left: 15px;">
<div class="slds-popover__body">
Id: {!v.hoveropb.Id}
Name: {!v.hoveropb.Name}
</div>
</div>
</div>
</aura:if>
</a>
</aura:iteration >
This is my JS
handleMouseOver : function(component,event,helper){
var id1=event.currentTarget.getAttribute("data-recId");
var action=component.get("c.getopportunityBundleProducts");
action.setParams({
"bid":id1
});
action.setCallback(this,function(re) {
var state=re.getState();
if(state==='SUCCESS'){
var items = component.find("hoveron");
component.set("v.hoverRow", parseInt(event.target.dataset.index));
component.set("v.hoveropb",re.getReturnValue());
}
});
$A.enqueueAction(action);
},
handleMouseOut : function(component,event,helper){
component.set("v.hoverRow",-1);
}