gradio/demo/dataframe_tab/run.py
pngwn a7fa47a175
ensure Dataframes in background tabs are visible when the tab is selected (#7354)
* add mutation observer to track visibility changes of tabs

* add changeset

* add changeset

* update console.log statements in Svelte component for debugging purposes

* remove unused table_width variable and update console logs in virtual table component

* move visibility check to table

* try dom rect bindings instead

* update binding of viewport_box to correctly calculate viewport height

* remove console.log statements and unused code

* add changeset

* add changeset

* remove unnecessary assignment of t_width in component

* update svelte-check to make ci pass

* update dependencies for happy-dom and vitest
merged from upstream

* add changeset

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2024-02-09 18:23:05 +00:00

13 lines
240 B
Python

import gradio as gr
with gr.Blocks() as demo:
with gr.Tab():
gr.HTML("<p>hi</p>")
with gr.Tab():
gr.Dataframe(
value=[[i + 1] for i in range(10)],
)
if __name__ == "__main__":
demo.launch()