313
Views
5
Comments
Input OnChange Delay - Reactive
Question
Application Type
Reactive
Service Studio Version
11.53.37 (Build 61887)

Hi!

I am trying to delay the onchange on my input field in reactive.

I added the script with only this: osOnChangeTimerDelay = 3000; 


I also tried called this script on screen, module and on initialize and I still can't make this work. 

Last year I tried with traditional and it worked, but with reactive I can't make it work. 


Can anyone help me please?
Best regards,
Diogo Luciano

2019-03-19 12-24-07
Mariano Picco
 
MVP

You might have to do this on the OnInitialize event of your Screen, instead of the action you're using for the onChange. This action runs when the field is changed, so by then it's too late for your use case. 

UserImage.jpg
Diogo Luciano

 Hi @Mariano Picco!

Thanks for the replay.

Actually I wasn't using on it. The print was to show the usage of the script on the script and not the actual flow.

I tried also on initialize but it didn't work. 

2021-09-06 15-09-53
Dorine Boudry
 
MVP

Hi Diogo,

I think the osOnChangeTimerDelay is only for Traditional.

What you need in react is a technique called debouncing.  

See the forge component Debounce by @Vincent Koning

Dorine

UserImage.jpg
Diogo Luciano

Hi @Dorine Boudry!

Thanks for the reply!

Actually this component gave me good ideias for implementation.
Unfortunately my project doesn't allow forge components, so I had to adapt.
But thanks for the tip!

UserImage.jpg
Lavanya A

Hi @Diogo Luciano did u got solution?


Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.