So I've got this component which seems to be reasonable use:

<aura:component implements="lightning:isUrlAddressable">
    <aura:handler name="init" value="{!this}" action="{!c.init}"/>
    <lightning:overlayLibrary aura:id="overlayLib">
        Hello planet!

JS controller:

    init: function (component) {

Will cause:

Action failed: c:TestPlayground$controller$init [component.find(...).show is not a function]

The documentation says there is one: https://developer.salesforce.com/docs/component-library/bundle/lightning:overlayLibrary/specification

Does it only appear after using showCustomModal method? If so, it's complete bonkers.

  • where do you open this component? lightning:overlayLibrary is supported only in Lightning Experience, Lightning Communities, Salesforce Mobile App. – Oleksandr Berehovskyi Nov 21 '18 at 7:00
  • 5
    I think that close, show, and hide might actually be Spring 19 enhancements, and the documentation is from the future. I can't get any of the three to work as documented. – sfdcfox Nov 21 '18 at 7:15
  • Using in LEX, but not in a traditional way - via URL (hence implemented interface). Other methods like showCustom... is still there. – dzh Nov 21 '18 at 7:20

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.