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
When show_row_numbers=False, the column widths are automatically adjusted as expected, like this:
But, when show_row_numbers=True, the automatic adjustment doesn't work correctly, and the table is rendered like this:
The column width adjustment should ignore the row number column and apply to the actual data columns, but it doesn't seem to be working that way.
Have you searched existing issues? 🔎
I have searched and found no existing issues
Reproduction
importgradioasgrimportpandasaspddf=pd.DataFrame(
data=[
{
"status": "RUNNING",
"title": "The quick brown fox jumps over the lazy dog",
"hardware": "cpu-basic",
}
]
)
withgr.Blocks() asdemo:
gr.Dataframe(value=df, show_row_numbers=True)
demo.launch()
Screenshot
No response
Logs
System Info
gradio==5.16.0
Severity
I can work around it
The text was updated successfully, but these errors were encountered:
This is probably a related issue, so I’m adding it here, but when the table is wide and show_row_numbers=True, the last column disappears.
show_row_numbers=False:
out0.mp4
show_row_numbers=True:
out1.mp4
repro:
importgradioasgrimportpandasaspddf=pd.DataFrame(
data=[
{
"status": "RUNNING",
"title": "The quick brown fox jumps over the lazy dog",
"summary": "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.",
"hardware": "cpu-basic",
"sdk": "gradio",
}
] *100
)
withgr.Blocks() asdemo:
gr.Dataframe(value=df, show_row_numbers=True)
demo.launch()
Describe the bug
When
show_row_numbers=False
, the column widths are automatically adjusted as expected, like this:But, when
show_row_numbers=True
, the automatic adjustment doesn't work correctly, and the table is rendered like this:The column width adjustment should ignore the row number column and apply to the actual data columns, but it doesn't seem to be working that way.
Have you searched existing issues? 🔎
Reproduction
Screenshot
No response
Logs
System Info
Severity
I can work around it
The text was updated successfully, but these errors were encountered: