Tables with variable row height get resized only on the second redraw

I have used the code example from documentation to create table with variable row height

http://webix.com/snippet/2e9015ff

In the snippet you can see that all table rows in the first section are 25 px, but if you collapse the header and reopen the section then the table looks just as it is supposed to.
the same stands for the second (collapsed) section. You need to collapse and reaopen it to show table in al its glory.

What am i doing wrong?

PS. Amazingly you can properly redraw the first table by just opening the second section…

There are two parts of the issue

a) you need to use .ready handler instead of “onresize” event, as resize event can occur before data loading and you need to adjust data after loading.

http://webix.com/snippet/27d6ed44

b) There is a bug with adjustRowHeight in case of hidden accordion panel, fix will be available as part of Webix 3.0 ( will be available on the next week )

Thanks for quick reply!
Maksim, just to make your life more diffcult - of course the above example was only stripped down version of the real thing. Namely the table was editable… I had resizing logic in ‘onAfterEditStop’.

http://webix.com/snippet/abd9e48d

But the problem is that even with autoheight set to true and scroll set to ‘y’ the table does not resize and vertical scrollbar does not show up. So after editing the last rows get pushed down out of view and can’t be scrolled to.

autoheight and vertical scroll are mutual exclusive features. When one is enabled, second will not work.

Check the updated snippet

http://webix.com/snippet/37d66dff

  • autoheight disabled
  • second parameter removed from adjustRowHeight ( as we do want to repaint the grid with new row sizes )

If you really need to use an autoheight, you need to wrap whole UI in a scrollview

“autoheight and vertical scroll are mutual exclusive features” - Now that i think about it, it makes perfect sense :slight_smile:
Dank je!

You write that "fix will be available as part of Webix 3.0 ".
What about the 2.x branch? Will it be updated?

The project i work on will be released nex week and I am afraid of switching to a new major version

If you have an active license, please drop an email to support@webix.com, I think we can provide a fixed build for 2.x branch.

Will do. Thanks