Unanswered
Composable Dashboard Widgets and Accessing Tile Heights
Hello,
Is there a way to determine the height of a composable dashboard tile that my extension may be installed in? In the configuration file for this extension, I do not have a height set so as to allow the tile to grow to the height of its contents (because the content is dynamic). However, testing our extension in a composable dashboard tile with a fixed height cuts off some of the content. Is there a way to get the height of the tile the extension is installed in from within the extension itself? Hoping to use that height to determine if we need to render the content differently if there is overflow.
Thanks!
178 Views
0
Answers
one year ago
one year ago
Tags
You can obtain the content block height from the module configurations within your extension code, e.g."dynamicContent": { ... "height": "350" }
— Derek Bedard one year agoYou could also obtain the height from within your extension's JS, e.g.
const olbWindow = window.parent.document
const contentBlock = olbWindow.getElementsByName('YourContentBlock_Main')[0]
const contentBlockHeight = contentBlock.scrollHeight
(where "YourContentBlock_Main" is tecton-platform-outlet element name)
You may need to subtract the top and bottom padding values from your height that are set by the env's css "var(--uux-app-contentBlock...
It looks like my last comment was cut off slightly. The env CSS variable is "var(--uux-app-contentBlockPadding". Thanks.
— Derek Bedard one year ago