X-Git-Url: http://git.ithinksw.org/extjs.git/blobdiff_plain/f5240829880f87e0cf581c6a296e436fdef0ef80..0494b8d9b9bb03ab6c22b34dae81261e3cd7e3e6:/docs/source/Combo.html diff --git a/docs/source/Combo.html b/docs/source/Combo.html index 61c09c38..8288c937 100644 --- a/docs/source/Combo.html +++ b/docs/source/Combo.html @@ -7,10 +7,10 @@
/*!
- * Ext JS Library 3.3.0
- * Copyright(c) 2006-2010 Ext JS, Inc.
- * licensing@extjs.com
- * http://www.extjs.com/license
+ * Ext JS Library 3.3.1
+ * Copyright(c) 2006-2010 Sencha Inc.
+ * licensing@sencha.com
+ * http://www.sencha.com/license
  */
 
/** * @class Ext.form.ComboBox @@ -943,10 +943,16 @@ myCombo.keyNav.tab = function() { // Override TAB handling function }, // private - assertValue : function(){ + assertValue : function(){ var val = this.getRawValue(), - rec = this.findRecord(this.displayField, val); + rec; + if(this.valueField && Ext.isDefined(this.value)){ + rec = this.findRecord(this.valueField, this.value); + } + if(!rec || rec.get(this.displayField) != val){ + rec = this.findRecord(this.displayField, val); + } if(!rec && this.forceSelection){ if(val.length > 0 && val != this.emptyText){ this.el.dom.value = Ext.value(this.lastSelectionText, ''); @@ -955,11 +961,11 @@ myCombo.keyNav.tab = function() { // Override TAB handling function this.clearValue(); } }else{ - if(rec){ + if(rec && this.valueField){ // onSelect may have already set the value and by doing so // set the display field properly. Let's not wipe out the // valueField here by just sending the displayField. - if (val == rec.get(this.displayField) && this.value == rec.get(this.valueField)){ + if (this.value == val){ return; } val = rec.get(this.valueField || this.displayField);