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

FlexBox does not respect height argument and does not provide scroll argument #7422

Open
MarcSkovMadsen opened this issue Oct 20, 2024 · 0 comments

Comments

@MarcSkovMadsen
Copy link
Collaborator

MarcSkovMadsen commented Oct 20, 2024

panel==1.5.2

In #7411 I'm trying to make it easier to "pick" examples for your model and data app. You will be able to select and example via a Button. Those buttons might ideally be layed out in a FlexBox to utilize the available width and the height you give it.

But its not possible as the height is not respected and there is no scroll parameter.

Reproducible Example

import panel as pn

pn.extension()

examples = [pn.widgets.Button(name=f"Beat Boxing {index}") for index in range(0,1000)]
pn.Column("Above", pn.FlexBox(*examples, height=500), "Below").servable()

image

It would be nice if all ListPanel layouts (Column, Row, FlexBox and more) where as close to drop in replacements for each other as possible.

Workaround

Put the FlexBox inside a Column. Set the height and scroll on the Column.

import panel as pn

pn.extension()

examples = [pn.widgets.Button(name=f"Beat Boxing {index}") for index in range(0,1000)]
pn.Column("Above", pn.Column(pn.FlexBox(*examples), height=500, scroll=True), "Below").servable()

image

@MarcSkovMadsen MarcSkovMadsen added TRIAGE Default label for untriaged issues type: bug and removed TRIAGE Default label for untriaged issues labels Oct 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants