PDA

View Full Version : [FIXED-381][3.x] New TriggerField.updateEdit method



Animal
9 Dec 2009, 12:38 PM
It should go in afterRender because it's BoxComponent.afterRender that gives a Component its configured size.



Ext.override(Ext.form.TriggerField, {
onRender : function(ct, position){
this.doc = Ext.isIE ? Ext.getBody() : Ext.getDoc();
Ext.form.TriggerField.superclass.onRender.call(this, ct, position);

this.wrap = this.el.wrap({cls: 'x-form-field-wrap x-form-field-trigger-wrap'});
this.trigger = this.wrap.createChild(this.triggerConfig ||
{tag: "img", src: Ext.BLANK_IMAGE_URL, cls: "x-form-trigger " + this.triggerClass});
this.initTrigger();
if(!this.width){
this.wrap.setWidth(this.el.getWidth()+this.trigger.getWidth());
}
this.resizeEl = this.positionEl = this.wrap;
this.updateEditState();
},

afterRender : function(){
Ext.form.TriggerField.superclass.afterRender.call(this);
this.updateEditState();
}
});

evant
13 Dec 2009, 11:49 PM
Fix applied to svn in rev #5774 for patch release 3.1.1.