Prevent JS execution on every keystroke

1
+1
-1

Hi,

I have a collection of text input widgets on a simple UI Designer form, as well as some javascript expression variables that are dependent on them. Currently, the js expressions execute on every keystroke captured in the inputs.

How can I ensure that the js expressions only execute when the user is finished entering data into the text widgets? I assume I can do this by making use of onKeyUp or similar with a JS timeout function, but I'm not sure how to go about doing this in UI designer.

The text input data will not have a specific minimum length.

Thanks in advance.

1 answer

1
0
-1
This one is the BEST answer!

Hello - you are looking for a throttle/debounced feature.

Default Bonita Widgets cannot be set to do this but it should be simple to extend them as Custom Widget using AngularJS module like this one .

HIH,

Notifications