# How to update custom component props in the designer

**URL:** <https://forum.inductiveautomation.com/t/how-to-update-custom-component-props-in-the-designer/85391>\
**Category:** Module Development\
**Tags:** perspective\
**Created:** [February 7, 2024, 5:06pm UTC](https://forum.inductiveautomation.com/t/how-to-update-custom-component-props-in-the-designer/85391 "2024-02-07T17:06:50Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Chad\_Gregory](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/chad_gregory/32/51192_2.png) [@Chad\_Gregory](https://forum.inductiveautomation.com/u/Chad_Gregory)\
**Post date:** [February 7, 2024, 5:06pm UTC](https://forum.inductiveautomation.com/t/how-to-update-custom-component-props-in-the-designer/85391/1 "2024-02-07T17:06:50Z")

</div>

I am tinkering around with creating a custom TextField to explore and learn how to build a component for perspective. I have a component with many props to set different aspects of the component but what I am struggling with is understanding how I update a prop from within the component.

For example with a text field how do I update the value prop as the user types into the input?

---

<div class="post-metadata">

**Author:** ![Chad\_Gregory](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/chad_gregory/32/51192_2.png) [@Chad\_Gregory](https://forum.inductiveautomation.com/u/Chad_Gregory)\
**Post date:** [February 12, 2024, 5:26pm UTC](https://forum.inductiveautomation.com/t/how-to-update-custom-component-props-in-the-designer/85391/2 "2024-02-12T17:26:36Z")

</div>

I have an event being fired onBlur of my custom textfield component but how do I get the value sent with that event to also update `value` under `props` in the sidebar? I am trying to replicate the same behavior the normal Perspective Textfield.

![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/6/d/6dd2567913a1f566ef06c37986716a813410600e.png)

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [February 12, 2024, 6:03pm UTC](https://forum.inductiveautomation.com/t/how-to-update-custom-component-props-in-the-designer/85391/3 "2024-02-12T18:03:16Z")

</div>

If you really need to write it manually, then you should have access to an implicit `props` that contains a reference to the `ComponentStore`, which itself contains a reference to the component's `props`, `meta`, `custom` as `PropertyTree` objects with a `write` method, e.g:  
`this.props.store.props.write("path", value);`

However, the input fields in Perspective are a fair bit more complicated than just simple `<Input>` wrappers since they need to handle theming across browsers, the "defer updates" settings, and some other aspects. It may or may not be easier to extend the base `<InputField>` class for your own purposes.

---

<div class="post-metadata">

**Author:** ![Chad\_Gregory](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/chad_gregory/32/51192_2.png) [@Chad\_Gregory](https://forum.inductiveautomation.com/u/Chad_Gregory)\
**Post date:** [February 12, 2024, 8:09pm UTC](https://forum.inductiveautomation.com/t/how-to-update-custom-component-props-in-the-designer/85391/4 "2024-02-12T20:09:26Z")

</div>

It would be more difficult in my case since I am bringing in a React UI library. I am starting with a TextField since it encompasses a bunch of the things I need to know how to do but I plan on integrating a bunch of other components that currently do not exist in Perspective.

I was able to get that value prop to update so thank you for that!
