wezzy
wezzy

Reputation: 5935

Ext JS textarea grow bug

we have an application that use some TextArea components in various tabs. The problem is that when we insert text into a TextArea (with grow:true) the TextArea correctly resize itself, but when we change the tab and display a new TextArea, this new TextArea has the size of the TextArea present into the other tab.

When we click on it the TextArea automatically resize to the right size.

How can i fix it ?

Thanks

Upvotes: 2

Views: 1937

Answers (1)

wezzy
wezzy

Reputation: 5935

i've found a solution by myself, i call autoSize() when the user change the tab

        mytabs.on("tabchange", function(){

        var list = Ext.query('textarea');
        for(var i = 0; i < list.length; i++){

            var ta = list[i];
            var id = ta.getAttribute('id');

            var cmp = Ext.getCmp(id);
            if(cmp && cmp.autoSize){
                cmp.autoSize();
            }
        }

    });

And it works great

Upvotes: 2

Related Questions