Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
RemiCELLARD opened this issue Sep 25, 2024 · 0 comments
Open

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

RemiCELLARD opened this issue Sep 25, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@RemiCELLARD
Copy link

RemiCELLARD commented Sep 25, 2024

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()).

@RemiCELLARD RemiCELLARD added the enhancement New feature or request label Sep 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

When branches are created from issues, their pull requests are automatically linked.

1 participant