ui
ui copied to clipboard
Add "autoResize"/"manualRender" options on ScrollBox
Please Describe The Problem To Be Solved
For my application, I'm adding several hundred elements to Containers. Each of these Containers represents a line displayed in the ScrollBox component.
Problem: As soon as I add a Container via ScrollBox.addItem
(or all with ScrollBox.addItems
), it takes a long time to render (~50s on my machine).
(Optional): Suggest A Solution
- Add an “autoResize”/“manualRender” option to render whenever you like + add
ScrollBox.render()
method to launch the render manually. - Run a single rendering (= 1 call to
this.resize()
) when calling theScrollBox.addItems
method (orScrollBox.addItem
with multiple parameters).
Because when you add an item (with ScrollBox.addItem
, see this line), it launches a rendering (it's ok).
But, if you add multiple items in one method call (with ScrollBox.addItems
), each item run a render (=> each items added = 1 call to this.resize()
).