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

show_row_numbers in gr.Dataframe doesn't work #10411

Open
1 task done
hysts opened this issue Jan 23, 2025 · 2 comments · May be fixed by #10490
Open
1 task done

show_row_numbers in gr.Dataframe doesn't work #10411

hysts opened this issue Jan 23, 2025 · 2 comments · May be fixed by #10490
Assignees
Labels
bug Something isn't working

Comments

@hysts
Copy link
Collaborator

hysts commented Jan 23, 2025

Describe the bug

According to the change log, #10376 is included in gradio==5.13.0, but row numbers are not displayed when setting show_row_numbers=True.

Also, when using the wheel in #10376 , row numbers is shown, but it's rendered like this:

  • The column for row numbers is too narrow.
  • The width of the column next to the row number is different from other columns, and as it's too narrow, you can't click the sort button.

Have you searched existing issues? 🔎

  • I have searched and found no existing issues

Reproduction

repro Space: https://huggingface.co/spaces/hysts-debug/dataframe-show-row-numbers

import gradio as gr
import numpy as np

np.random.seed(0)
data = np.random.randint(0, 100, size=(10, 10))

with gr.Blocks() as demo:
    gr.Dataframe(value=data, show_row_numbers=True)
demo.launch()

Screenshot

Logs

System Info

gradio==5.13.0

Severity

I can work around it

@hysts hysts added the bug Something isn't working label Jan 23, 2025
@abidlabs abidlabs self-assigned this Jan 23, 2025
@abidlabs
Copy link
Member

Weird thanks for flagging @hysts I'll take a look

@abidlabs
Copy link
Member

I started looking into this, but I noticed other strange behavior that happen for large dataframes, such as when you scroll down, the row numbers appear next to the header

Image

so I think better for @hannahblair to revisit this comprehensively when she's back!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants