The event handler ComboBox.onEditTextUpdated is supposed to have a text parameter, but it is always undefined.
This is actually a documentation bug. The description of this event handler should be:
void ComboBox.onEditTextUpdated()So the onEditTextUpdated() handler receives no arguments. The reason for this is that the current text in the ComboBox is already available as the property:
String ComboBox.editTextso making a duplicate to pass it to an event handler of the same object is a nonsense. I'll fix this item description in the next version.
Also it seems that the onEditTextUpdated is called before onItemSelected when we select an item.
The order of calls to different event handlers of a given object is always unspecified and can be altered arbitrarily by the PJSR and PCL engines. You should never write code that depends on a specific order or sequence of calls to event handler functions.
In your case it seems that you don't need to use the onEditTextUpdated() handler. You only need onItemSelected(). For example:
this.combo.onItemSelected = function( itemIndex )
{
let s = this.itemText( itemIndex );
// ... do something with the item text in variable s
this.editText = s;
};
Let me know if this helps.