|
#1
|
|||
|
|||
|
Hello,
I have a question regarding a ComboBoxItem. Here is the example : Code:
isc.setAutoDraw(true);
isc.DynamicForm.create ({
fields: [
{ name: "myField", type: "enum", editorType: "comboBox", valueMap: {"100": "NO", "200": "NOT", "2300": "NOTHING"},
changed: function (form, item, value) {
isc.logWarn ("changed = " + value);
}
}
]
});
If I enter "N" then O" for "NO", I get two log messages "changed" with the first one value = "N", and the second value = "100" (the value is being converted to the value of the "key" in the "key-name" pair of the "ValueMap") but I need to launch an event when I have a new value selected in the list and not when the text is changed in the ComboBox even if the text is in the valueMap. (The user maybe searching for "NOT" or "NOTHING") In the following example, even if the user enters "NO" to search for text, I need to launch an event when the "NO" option is selected in the "PickList" and the "PickList" is closed. I cannot use the "changed" event since it is not being launched when I click on the "NO" option. Is there a function or an event that is launched when the user picks a value in the "PickList" ? Can it be overriden ? Or is there a way to prevent the value from being converted to the key in the "valueMap" ? (The value in the "changed" event remains equal to the "name" value and not the "key" value until the user selects the item from the "PickList") Thank you |
|
#2
|
|||
|
|||
|
Some enhancements are planned in this area, however right now, the way to disambiguate whether a click was on the picklist or not would be to switch to populating the ComboBox with an optionDataSource (can be clientOnly) and use getSelectedRecord() from changed() to see if the user unambiguously chose a record.
|