Currently I have lightning component that I am inserting into a custom modal using the lightning overlay library: https://developer.salesforce.com/docs/atlas.en-us.lightning.meta/lightning/ref_lightning_overlayLibrary.htm

In the lightning component there are multiple picklists for the user the choose from however when clicking the picklist the picklist menu itself is created outside of view of the modal and a scrollbar is created increasing the size of the lightning component beyond that of custom modal holding it.

What I currently want to do is to replicate how lightning handles its own picklists by calculating whether the picklist menu would exceed the space of the modal and displaying its contents above the input box instead of below. If the modal does have scrolling I'd also like the menu options to follow the scrolling of the modal. (This is also done with standard lightning modals).

Is there a way to obtain the height of the custom modal container to determine the limits of whats currently in view.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.