Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save choudharymanish8585/275cc8bff970e7fef96465a31d02392a to your computer and use it in GitHub Desktop.
Save choudharymanish8585/275cc8bff970e7fef96465a31d02392a to your computer and use it in GitHub Desktop.
({
/**
* Get Selected Value from AutoComplete Component
* @author Manish Choudhari
* */
getSelectedValue : function(component, event, helper) {
//find autocomplete component using aura id
const autoCompleteComponent = component.find("account-record");
if(autoCompleteComponent){
//get selected option from auto complete component's selectedOption attribute
const selectedOption = autoCompleteComponent.get("v.selectedOption");
//set selected value in component attribute
component.set("v.selectedValue", selectedOption);
}
}
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment