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

can not use stretch sizing modes within a modal #6495

Open
wara6 opened this issue Mar 14, 2024 · 0 comments
Open

can not use stretch sizing modes within a modal #6495

wara6 opened this issue Mar 14, 2024 · 0 comments
Labels
type: bug Something isn't correct or isn't working
Milestone

Comments

@wara6
Copy link

wara6 commented Mar 14, 2024

I thought it was resolved in this issue but I'm still seeing this problem.
I used various widgets inside modals and I saw there was generally a display problem when using stretch sizing modes (sizing_mode="stretch_height" or width or both). Here's an example with Tabulator widget but you can easely reproduce this with other widgets.

import panel as pn
import pandas as pd
pn.extension()
pn.extension('tabulator')

data = {
    'A': [10, 20, 30, 40],
    'B': [5.5, 6.6, 7.7, 8.8],
    'C': ['apple', 'banana', 'cherry', 'date'],
    'D': [True, False, True, False]
}

df = pd.DataFrame(data)

button = pn.widgets.Button(name='click me')
str_pane = pn.pane.Str("tabulator modal")
tab = pn.widgets.Tabulator(df, sizing_mode='stretch_height')
ui = pn.template.VanillaTemplate()
ui.modal.append(pn.Column(str_pane, tab))
ui.main.append(button)
button.on_click(lambda x: ui.open_modal())

ui.servable()

In this example, when sizing_mode='stretch_height' is used upon the tabulator, tha tabulator is disapearing from the display.

Reproduced with panel 1.4.0b3

@philippjfr philippjfr added the type: bug Something isn't correct or isn't working label Mar 14, 2024
@philippjfr philippjfr added this to the v1.4.x milestone Mar 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Something isn't correct or isn't working
Projects
None yet
Development

No branches or pull requests

2 participants