0

I want to change the height of the lightning component that has a canvas iframe in it. The lightning components controller will pass the height to my backend and I will use that to set the height of the html returned. Any idea how to find out if this lightning component was added to the small chatter side, or the very top. In other words pass the width of the lightning component to its controller.

  • Why do you need to know this information? What problem are you trying to solve? This may be an x-y problem. – sfdcfox May 16 '18 at 21:42
  • want to make the height of the lightning component dynamic. Like if its in a small width, then height is 1000px, if its in medium then height is 800, if large then height is 600. something like that. The lightning component contains a force:canvasapp in it. – Danish May 16 '18 at 23:49
2

I believe that you may be looking for the lightning:flexipageRegionInfo component: https://developer.salesforce.com/docs/atlas.en-us.lightning.meta/lightning/components_config_for_app_builder_width_aware.htm

Cheers,

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.