Created
June 2, 2020 07:04
-
-
Save sudikrt/60905f076a1b3277bb0bd01ffa41f4a5 to your computer and use it in GitHub Desktop.
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
if ($A.get("$Browser.formFactor") === 'PHONE') { | |
$A.createComponent( | |
"aura:html", | |
{ | |
"aura:id": "styleTag", | |
"tag": "style", | |
"body": '.overLayCustomStyles {overflow : scroll; height:' + ($(window).height() - 173) + 'px;}' | |
}, | |
function(newHtml, status, errorMessage){ | |
//Add the new button to the body array | |
if (status === "SUCCESS") { | |
var body = cmp.get("v.body"); | |
body.push(newHtml); | |
cmp.set("v.body", body); | |
} | |
else if (status === "INCOMPLETE") { | |
console.log("No response from server or client is offline.") | |
// Show offline error | |
} | |
else if (status === "ERROR") { | |
console.log("Error: " + errorMessage); | |
// Show error message | |
} | |
} | |
); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment