Input value delayed by one character when using On change (Form + Array variable)

Hello,

I have an input inside a form with an On change workflow that updates an array variable.
The issue is that the saved value is always one character behind what I type.

Has anyone encountered this before, or is there a best practice to avoid this?

Thanks in advance!

We use this reguarly not inside a form and it works as expected are you using the event.value?

Hi, try to use ā€œdebounceā€. It should solve the problem.

Right now the ā€œonChangeā€ event fires every time you input a value, which is too fast and doesn’t give enough time for the change to be processed.

In my opinion you should use debounce on every input that triggers the ā€˜onChange’ event.

2 Likes

I haven’t had an issue with this. I could see it happening if you were looking at the inputs value rather then using the event.value. Have you had this issue before?

yes, from the very beginning. My luck was that I noticed it pretty quickly in the console logs - some changes just were not reflected there.

And I assumed that the reason might be the code execution speed compared to inputting values.

Thanks all for your feedback, it has bees resolved with debounce, thanks @Batik_Okazov

1 Like