Created
February 20, 2019 19:19
-
-
Save choudharymanish8585/5aeede5973890166b694f423e6b14fab to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
({ | |
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