Last active
April 6, 2018 07:42
-
-
Save rahulmalhotra/3a467f45937aa7106bcf000ecaf16bb2 to your computer and use it in GitHub Desktop.
Controller file in container component used in Lightning Events Tutorial Part 3 by SFDC Stop - added event.stopPropagation();
This file contains 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
({ | |
// Function to handle Lightning Event | |
handleTotalIncomeComponentEvent : function(component, event, helper) { | |
alert('Event handler at the parent component'); | |
// Getting the value of totalIncome attribute of event using event.getParam() | |
var totalIncome = event.getParam('totalIncome'); | |
// Setting the totalIncome attribute of component with the event's totalIncome attribute value. | |
component.set('v.totalIncome', totalIncome); | |
event.stopPropagation(); | |
} | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment