onTextboxValueChanged
@combeenation/custom-code-utils
Variable: onTextboxValueChanged()
constonTextboxValueChanged: (ctrlName,callback,trigger,debounceMS?) =>void=CtrlValueChanged.onTextboxValueChanged
Function for assigning a callback to textbox value changes.
The function can distinguish between different trigger modes, so that the user can decide if the callback should be
executed on each character input, when pressing enter, when leaving the textbox or on a combination of these trigger
events.
Furthermore the function can be debounced to minimize the amount of callback executions.
If neither the trigger parameter, nor the debounceMS parameter is set, the function behaves exactly as the
"Value Changed" signal of the textbox control.
Parameters
ctrlName
string
callback
(value, ctrl) => void
trigger
TextboxValueChangeTrigger = TextboxValueChangeTrigger.OnTypingAndEnterSubmit
Decide on which trigger the value change callback should be executed, see
TextboxValueChangeTrigger for detailed information about the options.
If the trigger input is left undefined, on typing and enter submit triggers will be used.
debounceMS?
number
Defers the call until the value changed event hasn't been triggered for this amount of time, only takes effect for TextboxValueChangeTrigger.OnTyping trigger.\
0: no debouncing\> 0: debouncing with the defined time in milliseconds\undefined: use default debouncing time from textbox control
Returns
void