Can a module be made to scale vertically?

Hello,

We have created a custom component that automatically scales both vertically and horizontally as the component is resized. In order to make this component user friendly we have created a module that contains only this component (as this allows us to to define inputs for the widget in question).

The issue is, while the contents of a component resize as desired, when inside of a module the contents only scale horizontally. Setting the height scaling to fixed has no effect on the appearance.

Screenshots:
image
image

Thanks,
Sam

Hey @Sam_Matthews!

It looks like this isn't possible at the moment but I've submitted a request for the dev team to look at and can follow up here if it becomes possible to scale components based on the containing module's size!

Hi, our lead dev has manager to accomplish this using some css magic. When a component within a module is called <componentName> and that module is added to an app, there is a div with a property: "data-testid" that has a value of <otherStuff...><componentName>.

Using a global css style of:

div[data-testid^="<componentName>"]{
    height: 100%!important;
}

seems to get the result we want.

I should note, this only expands a module to fit a larger container, it doesn't shrink it if the container is smaller than its component

1 Like