Add visible check to Tab (#7220)

* add visible check to TabItem

* add changeset

* remove hide class

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
This commit is contained in:
Hannah 2024-01-30 18:34:53 +00:00 committed by GitHub
parent faead1403c
commit 3b8dfc684d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 7 additions and 1 deletions

View File

@ -0,0 +1,6 @@
---
"@gradio/tabitem": patch
"gradio": patch
---
fix:Add `visible` check to Tab

View File

@ -31,7 +31,7 @@
<div
id={elem_id}
class="tabitem {elem_classes.join(' ')}"
style:display={$selected_tab === id ? "block" : "none"}
style:display={$selected_tab === id && visible ? "block" : "none"}
role="tabpanel"
>
<Column>