Main component hugs contents, but instance of it doesn't
I created this modal component that adjusts its height accordingly when an error message appears below a form field. The instance of it, however, doesn’t do that.
I’m confused about this behavior. The main component is set to “hug” for height, so I don’t understand why the instance is treating it like its fixed.
Page 1 / 1
Hi @Angela Liu ,
tried the steps, and everything is working fine for me. However, could you please check if the supporting text is not set to absolute position or if auto layout is being ignored? If that's the case, it won’t work properly. Also, you set the main component to ‘hug’ (right), but please make sure the text field component is set to either fixed add the “min height”. If it's set to ‘hug’, it won’t work as expected.
Option 1 - remove the abosolute position or ignore auto layout
Option 2 - add min height or fixed height
Please do let me know if the solution works for you
@Akash Kale this is how the main component looks for the form field itself:
I tried adjusting the constraints for “Container” and its contents like you suggested: from hug to fixed, fixed to hug etc, but that didn’t seem to change anything.
The modal:
Fields section in the modal:
Hi @Angela Liu, if possible could you please send me the figma link? I will check and let you know the fixes. Thanks
@Akash Kale unable to send link, here are screenshots for the form field and modal components though:
let me know if there’s anything else you need, thank you