Skip to content

Add "autoResize"/"manualRender" options on ScrollBox #197

@RemiCELLARD

Description

@RemiCELLARD

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 the ScrollBox.addItems method (or ScrollBox.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()).

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions