Skip to content

Instantly share code, notes, and snippets.

@lfreeland
Created April 9, 2018 00:07
Show Gist options
  • Save lfreeland/8e94c727df3ba0e7b832c79b18c883ec to your computer and use it in GitHub Desktop.
Save lfreeland/8e94c727df3ba0e7b832c79b18c883ec to your computer and use it in GitHub Desktop.
Collapsible Section Lightning Component Controller
({
handleSectionHeaderClick : function(component, event, helper) {
var button = event.getSource();
button.set('v.state', !button.get('v.state'));
var sectionContainer = component.find('collapsibleSectionContainer');
$A.util.toggleClass(sectionContainer, "slds-is-open");
}
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment