-
Notifications
You must be signed in to change notification settings - Fork 108
Open
Labels
Milestone
Description
Is there a canonical way to specify different column widths in render.DataGrid()
?
In the following example, I'd like to keep columns a
and b
at a reasonably small width, while allowing column c
to expand enough to accommodate long lines of text.
from shiny import App, Inputs, Outputs, Session, render, ui
import pandas as pd
df = pd.DataFrame(
{
"a": [0],
"b": [0.1],
"c": ["A very long line that goes on and on and on"],
}
)
app_ui = ui.page_fluid(
ui.card(
ui.output_data_frame("odf"),
),
)
def server(input: Inputs, output: Outputs, session: Session):
@render.data_frame
def odf():
return render.DataGrid(df)
app = App(app_ui, server)

corey-dawsonpstorozenko and sean-S2G