Search code examples
javascriptcssextjsextjs3

Compositefield inside formpanel with autoHeight


I have a formpanel with various fields. The panel has autoScroll.

CompositeField has a SuperBoxSelect based element ( ux - multiple selected tags in form etc) - and a button at the end.

Now the problem is that the compositefield does not resize to fit the increased size of its contents. It keeps the default size it had on render.

Form is populated from selected grid rows. So data amount can change.

It will fix itself when i resize the whoel formpanel ( split bars on left/top).

I added autoResize to almost everywhere when testing, still nothing.

Is there a way to force the formpanel to reload or render when i add data to it, so it? ( since apparently the height/width change works).


Solution

  • this seemed to do the trick:

    this.fields.tags.on('autosize', function(tags){
      tags.ownerCt.doLayout();
    });