-
4 Sep 2012 11:13 PM #1
Extjs 3.4 textarea height reset
Extjs 3.4 textarea height reset
Hi,
I want to reset the height of auto growing textarea to its original height once it is set to empty. But because of the "emptyText", textarea expands itself.
Is there any way to configure textarea so that it does not consider "emptyText" for expending height.
Thanks...
-
4 Sep 2012 11:39 PM #2Ext JS Premium Member
- Join Date
- Apr 2008
- Location
- Groningen - Netherlands
- Posts
- 1,017
- Vote Rating
- 23
Well this is a 4.1 forum but...
If it grows to fit the text then you can set a new Height with getHeight(defaultHeight)
Or override this function to you needs
Switch the orderCode:setValue : function(v){ if(this.emptyText && this.el && !Ext.isEmpty(v)){ this.el.removeClass(this.emptyClass); } Ext.form.TextField.superclass.setValue.apply(this, arguments); this.applyEmptyText(); this.autoSize(); return this; },
First autosize then set emptytextCode:this.autoSize(); this.applyEmptyText();


Reply With Quote