# Not possible to override custom component height value with function

**URL:** <https://community.appfarm.io/t/not-possible-to-override-custom-component-height-value-with-function/1448>\
**Category:** Bug reports\
**Created:** [October 15, 2024, 7:43am UTC](https://community.appfarm.io/t/not-possible-to-override-custom-component-height-value-with-function/1448 "2024-10-15T07:43:16Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Geira-ENVE](https://dub1.discourse-cdn.com/flex013/user_avatar/community.appfarm.io/geira-enve/32/2638_2.png) [@Geira-ENVE](https://community.appfarm.io/u/Geira-ENVE)\
**Post date:** [October 15, 2024, 7:43am UTC](https://community.appfarm.io/t/not-possible-to-override-custom-component-height-value-with-function/1448/1 "2024-10-15T07:43:16Z")

</div>

Hi. I am trying to use a function to override and return different height values of the same custom component, but when i do the app crashes. I have defined a height of 100% on the custom component, and even if i just try to return 50% with a function, it crashes

---

<div class="post-metadata">

**Author:** ![rhys](https://dub1.discourse-cdn.com/flex013/user_avatar/community.appfarm.io/rhys/32/1379_2.png) [@rhys](https://community.appfarm.io/u/rhys)\
**Post date:** [October 15, 2024, 8:22am UTC](https://community.appfarm.io/t/not-possible-to-override-custom-component-height-value-with-function/1448/2 "2024-10-15T08:22:44Z")

</div>

Hi!

Thank you for sending this in. Additional information, such as the function you are using and the specific error message you recieve (maybe in the browser console) will be helpful for us in investigating this issue.

Thanks  
Rhys  
Appfarm

---

<div class="post-metadata">

**Author:** ![Geira-ENVE](https://dub1.discourse-cdn.com/flex013/user_avatar/community.appfarm.io/geira-enve/32/2638_2.png) [@Geira-ENVE](https://community.appfarm.io/u/Geira-ENVE)\
**Post date:** [October 15, 2024, 9:08am UTC](https://community.appfarm.io/t/not-possible-to-override-custom-component-height-value-with-function/1448/3 "2024-10-15T09:08:20Z")

</div>

Well, i had defined the custom components height to be 100%, and then i just tried to use a function to write “return 50;” and then it crashed.

---

<div class="post-metadata">

**Author:** ![rhys](https://dub1.discourse-cdn.com/flex013/user_avatar/community.appfarm.io/rhys/32/1379_2.png) [@rhys](https://community.appfarm.io/u/rhys)\
**Post date:** [October 15, 2024, 9:51am UTC](https://community.appfarm.io/t/not-possible-to-override-custom-component-height-value-with-function/1448/4 "2024-10-15T09:51:21Z")

</div>

In the browser console there is likely to be an error message explaining why Create crashed - if possible, please paste this error message here. Screenshots of the setup with the component are also useful for us to be able to recreate the problem.
