Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save choudharymanish8585/5aeede5973890166b694f423e6b14fab to your computer and use it in GitHub Desktop.
Save choudharymanish8585/5aeede5973890166b694f423e6b14fab to your computer and use it in GitHub Desktop.
({
doInit : function(component, event, helper) {
helper.onSearch(component, helper);
},
doSearch : function(component, event, helper) {
//this line will get all the argument passed to aura:method
var params = event.getParam('arguments');
//checking if param is not undefined
if (params) {
//getting carTypeId from all argument, and setting component attribute value
component.set("v.carTypeId", params.carTypeId);
helper.onSearch(component, helper);
}
},
onCarSelect : function(component, event, helper) {
// use event.getParam to get attribute value from event
component.set("v.selectedCarId", event.getParam("carId"));
},
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment