PDA

View Full Version : liquidLayout and containers



mattjenkins
6 Feb 2015, 2:47 PM
I have been trying out liquidLayout (http://docs.sencha.com/extjs/5.1/5.1.0-apidocs/#!/api/Ext.Component-cfg-liquidLayout) on most of the components in my UI to see if there is a performance gain, but I have run into a snag when trying to add items to a container with liquidLayout:true. They aren't added to the DOM no matter what I try. All my containers use the default (auto) layout.

This also applies if any ancestor of the target container has liquidLayout:true.

I'm doing almost everything in CSS, but I still want to use containers and add/remove items.

Is there any way to get items added to a liquidLayout container (or descendant thereof) written to the DOM? Perhaps some simple method call on the container or items themselves?

mattjenkins
7 Feb 2015, 10:27 AM
I found the answer after digging through the source.

It's case of calling getLayout().renderChildren() on the container after adding items to it.

Whether or not this is a good idea remains to be seen. Any thoughts?