Skip to content

Instantly share code, notes, and snippets.

@choudharymanish8585
Created February 21, 2019 18:58
Show Gist options
  • Save choudharymanish8585/b2bebfdd1295394df7006f85c4061d01 to your computer and use it in GitHub Desktop.
Save choudharymanish8585/b2bebfdd1295394df7006f85c4061d01 to your computer and use it in GitHub Desktop.
({
onCarSelected : function(component, event, helper) {
component.set("v.Id", event.getParam("car").Id);
component.set("v.showComponent", true);
/*
* handle record change;
* reloadRecord will cause you to lose your current record,
* including any changes you’ve made
* */
component.find("service").reloadRecord();
},
hideComponent : function(component, event, helper) {
component.set("v.showComponent", false);
},
onCarExpAdded : function(component, event, helper) {
component.set("v.tabId", "carexpstab");
//component.find("tabs").set("v.selectedTabId", "carexpstab");
/*
* Here we are calling a aura:method named refresh
* which is present in CarExperiences component
* calling to this method is not mandatory as we are
* using change event listner in CarExperiences component
* */
component.find("carExp").refresh();
},
onRecordUpdated : function(component, event, helper) {
if(component.find("carExp")){
/*
* Here we are calling a aura:method named refresh
* which is present in CarExperiences component
* calling to this method is not mandatory as we are
* using change event listner in CarExperiences component
* */
component.find("carExp").refresh();
}
},
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment