Rendering issue: toolbar inside a layout

Adding a toolbar with batches, spacer and responsive using addView inside a $ready function will lead to strange behavior.
It'll work fine, if the function is called after the layout has finished rendering.



  • Hi,

    Here is the simple workaround

    Instead of using addView, you can inject toolbar directly into the provided rows collection, so it will be initialized as part of default layout building logic.

  • The original problem is related to the components sizing, on the moment of $ready call, the layout is fully ready but it has not final sizes yet, so elements added with addView will not able to detect real parent sizes as well.

    It is not a problem normally, but "responsive" attribute triggers UI reflow based on sizes, and in case of not defined sizes it behaves in a not-expected way.

    We will check the core logic, but I still recommend to use the above workaround, as it solves the issue and works faster than code with separate addView calls.

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion