Tree - autosize

Hello,

Is it possible to have the tree component to fill its container?

I tried to give width/height 100% to the container div, it works for the div but the tree component is still placed with fixed w/h inside the container. Any clue?

Thanks,
Bulent

If you have not defined sizes for tree component itself it will fill the container

http://snippet.webix.io/d5dfa128

If you are using percent based sizes on html element, be sure to add the next style to the page

html, body { height:100%; } 

Thank you maksim, I forgot to mention that the container is a non-webix & resizable container. To demonstrate it, I created a snippet.

http://snippet.webix.io/613570b7

If you resize the “row 2”, the div fits automatically but the tree does not.

Note that, the snipped has a webix layout instead of the 3rd party layout to explain it easily. So I ignored any child auto-resize feature(s) that the webix layout may have.

Yes when components are included inside of templates they will lost auto-resize ability.

You can change a structure of layout, and use separate tree and template views
http://snippet.webix.io/023fe0c2

Or you can use a custom code and call tree.resize() after resizing the related cell to apply new sizes for the tree

http://snippet.webix.io/679e227d

By the way, we have in plans to extend support of such use-case ( componentn inside of template ) in one of next updates

Great! Now I understand it better.
Thank you!