Calling the component that is currently being edited

Is there a way to call the component that is currently being edited? Something like {{table1.selectedRow.data}}, but applied to text input or any other component in the project. Thanks

Hey @PepeVergara

Can you share a bit more about your use case?

textInputName.value should always have the current value of the component:

I want to call the component that is currently being edited, as shown in the picture.

Hi @PepeVergara

Thanks for this screenshot! Currently, we don't have a feature like this :disappointed: I am moving this to our feature requests section.

In the meantime, could you trigger an event on success of modifying the component? For example, you could trigger an event when textInput2.value changes that updates a temporary state value or triggers the update query directly.

You might also find that the triggeredById property is helpful: https://docs.retool.com/docs/scripting-retool#retrieving-source-of-query-trigger

1 Like