1. #1
    Sencha User
    Join Date
    Sep 2012
    Posts
    3
    Vote Rating
    0
    amitakhatri is on a distinguished road

      0  

    Default 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...

  2. #2
    Ext JS Premium Member tvanzoelen's Avatar
    Join Date
    Apr 2008
    Location
    Groningen - Netherlands
    Posts
    1,114
    Vote Rating
    30
    tvanzoelen has a spectacular aura about tvanzoelen has a spectacular aura about tvanzoelen has a spectacular aura about

      0  

    Default


    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

    Code:
    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;
        },
    Switch the order
    Code:
    this.autoSize();
    this.applyEmptyText();
    First autosize then set emptytext

Thread Participants: 1

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi