I have lightning component and want to show a lightning card on mouseover on the link, is there any lightning event I can call to show to popup mobile card? this is my code:
===apex-Controller===
public with sharing class ContactController {
@AuraEnabled
public static List<Contact> getList() {
return [SELECT id, name, phone FROM Contact LIMIT 50];
}
}
====Component===
<aura:component controller="ContactController">
<aura:attribute name="contacts" type="Contact[]"/>
<aura:handler name="init" value="{!this}" action="{!c.doInit}" />
<ul>
<aura:iteration items="{!v.contacts}" var="contact">
<li>
<a href="javascript:void(0)" data-contactId="{!contact.Id}" onclick="{!c.customRedirect}">{!contact.Name}</a>
</li>
</aura:iteration>
</ul>
({
doInit : function(component, event) {
var action = component.get("c.getList");
action.setCallback(this, function(a) {
component.set("v.contacts", a.getReturnValue());
});
$A.enqueueAction(action);
},
customRedirect : function (component, event){
var selectedItem = event.currentTarget;
var selectedId = selectedItem.dataset.contactId;
console.log("selected ID = "+selectedId);
var navEvt = $A.get("e.force:navigateToSObject");
navEvt.setParams({
"recordId": selectedId,
"slideDevName": "detail"
});
navEvt.fire();
},
})
URLFOR
- see - trailhead.salesforce.com/en/modules/lex_dev_visualforce/units/…