我在录入数据后点击保存后combo的显示就出现了这种情况。感觉render很有问题。跪求大侠指点,敢问为什么会出现这种情况呢?Yyqkhzlr.comboBoxRenderer = function(combo) {
return function(value) {
var idx = combo.store.find(combo.valueField, value);
var rec = combo.store.getAt(idx);
return (rec == null ? value : rec.get(combo.displayField));
};
}Ext JS
return function(value) {
var idx = combo.store.find(combo.valueField, value);
var rec = combo.store.getAt(idx);
return (rec == null ? value : rec.get(combo.displayField));
};
}Ext JS
Yyqkhzlr.comboBoxRenderer = function(combo, grid) {
return function(value) {
var combo = this.getEditor();
if (combo.store.getCount() == 0) {
combo.store.on('load', refreshGrid, grid, {
// tried this, still hangs. i've also tried 'single: true'
buffer: 1000
});
}
// just for easy code reading, split out the refresh
function refreshGrid() {
grid.getView().refresh();
}
var idx = combo.store.find(combo.valueField, value);
if (idx == -1) {
return value;
}
var rec = combo.store.getAt(idx);
return (rec == null ? '' : rec.get(combo.displayField));
};
}