Event handler for text input

I have a problem where i want to use an event handler for “enter” to post a question, and it does not reset the text input field. The action that runs is supposed to delete the runtime data which acts as the text input. We have previously used the text input adornment to run the same action, which works just fine. Looking at the runtime data source in the debugger while initiating the action, it actually gets deleted as it should, but the text input field is still not reset even though its data source is emptied.

It also works when toggling off “update on keypress”, but then the whole point of using the event handler kind of disappears. Do you know of any fixes, or if this is a bug you are already familiar with?

Hi!

Not heard any issues related to that, but I do not think that is a regular pattern / way to clear a text input property. Can you try just doing an update object setting that property to null instead?

However, that being said, we’ll check this one out as it sounds like incorrect behaviour!

Tried now to make it update instead of removing the object in the runtime input, and it still “holds on” to the input even though the data source is being updated.

Still works when using the adornment tho

Hi again,

Just checked this one out. We have a challenge related to this one, and it’s fixed in the upcoming release (ETA end of month)! The challenge was related to “On value change” combined with update on keypress, where UI was not updated when the action modified the same property.

Okay, then that may be a related issue. But we are not using any “On value change” action, just “on abornment click” and the event handler which runs the same action.

Maybe this video can explain some more (the first question is made with event handler, and the second by clicking the adornment):

Thanks for good recording! It is a similar issue, but not the same, so I’ve registered a prioritized issue for this one for the upcoming release!

In fact, you see the same issue here:
https://showroom.appfarm.app/use-cases/comment-log

Hi,

This is fixed and scheduled to be released tuesday evening.

1 Like

Hi again, was excited to try this one with the new update, but it’s still not optimal. The text field is still not resetting when using the event handler, but now if i just click anywhere on my computer after using the event handler, the text disappears. So i guess it’s “better”, but it’s not fixed

Hi,

Not quite sure what is not working and how it is set up. The case that previously was broken, found here, is working after the new version. Also, please verify that the client has been upgraded (happens automatically for Dev when opening Create, and pretty straight after deploy to Test, Staging, Prod )
image

Okay, so i found the issue. In my case i was using a multi-line text edit, where the “on enter” event handler on the text edit is unavailable. But after looking at the setup in showroom i got it working with updating the text edit to null, thanks!

1 Like