Skip to content

Commit

Permalink
Make fixed height optional
Browse files Browse the repository at this point in the history
  • Loading branch information
wch committed Jun 27, 2023
1 parent c3a53cc commit b3ab290
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion examples/output_data_frame_grid/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
),
ui.input_switch("gridstyle", "Grid", True),
ui.input_switch("fullwidth", "Take full width", True),
ui.input_switch("fixedheight", "Fixed height", True),
ui.output_data_frame("grid"),
ui.panel_fixed(
ui.output_text_verbatim("detail"),
Expand All @@ -29,7 +30,7 @@ def server(input: Inputs, output: Outputs, session: Session):
@output
@render.data_frame
def grid():
height = 350
height = 350 if input.fixedheight() else None
width = "100%" if input.fullwidth() else "fit-content"
if input.gridstyle():
return render.DataGrid(
Expand Down

0 comments on commit b3ab290

Please sign in to comment.