Rus*_*rri 22
通常,您可以findRecordByValue在组合框上使用该方法:
combobox.on('change', function(combobox, newValue, oldValue) {
// Get the old and the new records.
// NOTE: The underlying store is not guaranteed to
// contain an associated record.
var oldRecord = combobox.findRecordByValue(oldValue);
if (oldRecord) {
// Do something...
}
var newRecord = combobox.findRecordByValue(newValue);
if (newRecord) {
// Do something...
}
});
Run Code Online (Sandbox Code Playgroud)
在发布我的问题后几乎立即想出来.
我的问题是我绑定了错误的事件,我使用'更改'而不是'选择'.
选择事件为您提供包含其中完整对象的记录.