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
gr.Tabs(selected=X) doesn't work when more than one component reference returned for event outputs #7089
Comments
@hannahblair Thanks for working on this so quickly. Here's what I found:
I tested this code:
The app navigated to the inactive tab, and the tab stayed inactive when I clicked back to the 1st tab. This was the previous behavior. I'm not clear if this is the desired behavior or not? #7090
The result was that the tab was renamed, but the app did not navigate to the 2nd tab, which was the previous issue.
|
@hannahblair Yep, that was it. I uninstalled, then reinstalled the .whl. Just to verify:
This was the behavior I saw in this code:
|
@dwipper Great! Yep, the 3 points you outlined reflect the behaviour I'm seeing in your demo. Is that not the functionality you expected? |
@hannahblair Yes. I did also notice that if a Tab is visible=False or interactive=False, the app won't navigate to the Tab, which makes sense. I just wonder if the code should throw an error? Visually nothing happens, and from a coding side, it appears that everything is "normal". But I leave it to you and the engineering gurus, as to whether that makes sense or not. |
Yeah I agree, actually! We'll discuss the best approach for that UX-wise and add that as an improvement 👍 |
Describe the bug
After upgrading to Gradio 4.15.0, it appears that gr.Tabs(selected=X) doesn't work if other components are included in the same return statement, i.e. return gr.Tabs(selected=2), gr.Tab(interactive=True). See the below code example.
This appears to be a somewhat related issue, but not exactly the same: #7085
Have you searched existing issues? 🔎
Reproduction
Screenshot
NA
Logs
System Info
Severity
I can work around it
The text was updated successfully, but these errors were encountered: