Created
July 2, 2018 23:25
-
-
Save SalesforceBobLightning/c17c801e8972c50b759bb43e7baa86d3 to your computer and use it in GitHub Desktop.
Salesforce Lightning JavaScript Helper method for opening a custom modal window
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
| openModel : function(cmp, componentName, params, modelId, header, cssClass, callback) { | |
| var modalBody; | |
| $A.createComponent(componentName, params, | |
| function(content, status) { | |
| if (status === "SUCCESS") { | |
| modalBody = content; | |
| cmp.find(modelId).showCustomModal({ | |
| header: header, | |
| body: modalBody, | |
| cssClass: cssClass, | |
| showCloseButton: true, | |
| closeCallback : callback | |
| }) | |
| } | |
| }); | |
| }, |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment