You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Seems like there's some kind of conflict between scrolling data grids horizontally and setting the column width, I'd expect the first column in both of these grids to be the same width.
from shiny import App, render, ui
import polars as pl
import numpy as np
# Create a DataFrame with 50 columns
df = pl.DataFrame({f"col_{i}": np.random.randn(100) for i in range(50)})
app_ui = ui.page_fillable(
ui.card(ui.output_data_frame("wide_df")),
ui.card(ui.output_data_frame("narrow_df")),
)
style = [
{
"cols": [0],
"style": {"width": "500px"},
}
]
def server(input, output, session):
@render.data_frame
def wide_df():
return render.DataGrid(
df,
filters=True,
styles=style,
)
@render.data_frame
def narrow_df():
return render.DataGrid(
df.select(pl.col("^col_[0-3]$")), filters=True, styles=style
)
app = App(app_ui, server)
The text was updated successfully, but these errors were encountered:
Seems like there's some kind of conflict between scrolling data grids horizontally and setting the column width, I'd expect the first column in both of these grids to be the same width.
The text was updated successfully, but these errors were encountered: