PDA

View Full Version : Basicform override to keep deferredRender: true on TabPanel



rpiwonka
4 Feb 2009, 8:53 AM
I was having a problem with tabpanels on forms requiring deferredRender set to false or the isDirty method of BasicForm would always return true. Why complain when we can override!



Ext.override(Ext.form.BasicForm, {
isDirty : function(){
var dirty = false;
this.items.each(function(f){
if(f.isDirty()&& f.rendered == true){
dirty = true;
return false;
}
});
return dirty;
}
});


Like magic now you can keep your deferredRender and isDirty will behave.